From 5419801dbcec1089cdaa608e48d1802047c63901 Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Wed, 25 Jan 2023 15:46:10 -0500 Subject: [PATCH 01/44] Separate layout route for app routes --- app/components/NavBar/NavBar.tsx | 2 +- app/dialogs/AddSongs/AddSongs.tsx | 4 +- app/dialogs/EditSetlist/EditSetlist.tsx | 2 +- app/root.tsx | 17 +- app/routes/__app.tsx | 22 ++ app/routes/{ => __app}/setlists/$id/edit.tsx | 0 app/routes/{ => __app}/setlists/$id/index.tsx | 0 .../{ => __app}/setlists/$id/qrcode.tsx | 0 .../{ => __app}/setlists/$id/update-songs.tsx | 0 app/routes/{ => __app}/setlists/index.tsx | 0 app/routes/{ => __app}/setlists/new.tsx | 0 app/routes/{song => __app/songs}/$id/edit.tsx | 2 +- .../{song => __app/songs}/$id/export/html.tsx | 0 .../{song => __app/songs}/$id/index.tsx | 2 +- app/routes/{song => __app/songs}/index.tsx | 6 +- app/routes/{song => __app/songs}/new.tsx | 0 app/routes/index.tsx | 2 +- app/styles/tailwind.css | 252 +++++++----------- 18 files changed, 137 insertions(+), 174 deletions(-) create mode 100644 app/routes/__app.tsx rename app/routes/{ => __app}/setlists/$id/edit.tsx (100%) rename app/routes/{ => __app}/setlists/$id/index.tsx (100%) rename app/routes/{ => __app}/setlists/$id/qrcode.tsx (100%) rename app/routes/{ => __app}/setlists/$id/update-songs.tsx (100%) rename app/routes/{ => __app}/setlists/index.tsx (100%) rename app/routes/{ => __app}/setlists/new.tsx (100%) rename app/routes/{song => __app/songs}/$id/edit.tsx (99%) rename app/routes/{song => __app/songs}/$id/export/html.tsx (100%) rename app/routes/{song => __app/songs}/$id/index.tsx (99%) rename app/routes/{song => __app/songs}/index.tsx (93%) rename app/routes/{song => __app/songs}/new.tsx (100%) diff --git a/app/components/NavBar/NavBar.tsx b/app/components/NavBar/NavBar.tsx index 61363b2..78f386c 100644 --- a/app/components/NavBar/NavBar.tsx +++ b/app/components/NavBar/NavBar.tsx @@ -10,7 +10,7 @@ export const NavBar: React.FC = () => {
PubJam
`${isActive && "underline font-bold"}`} > Songs diff --git a/app/dialogs/AddSongs/AddSongs.tsx b/app/dialogs/AddSongs/AddSongs.tsx index 05782f2..8282fc6 100644 --- a/app/dialogs/AddSongs/AddSongs.tsx +++ b/app/dialogs/AddSongs/AddSongs.tsx @@ -11,7 +11,7 @@ import { Search } from "~/components/Search"; import { useModalFetcher } from "~/lib/remix-modals"; import { useModal } from "~/lib/remix-modals/useModal"; import { useSearch } from "~/lib/useSearch"; -import type { loader as SetlistLoader } from "~/routes/setlists/$id/index"; +import type { loader as SetlistLoader } from "~/routes/__app/setlists/$id/index"; export function AddSongs() { const setlistData = useRouteData>( @@ -25,7 +25,7 @@ export function AddSongs() { const [songs, setSongs] = useState([]); useEffect(() => { - loadSongs("/song?index"); + loadSongs("/songs?index"); }, [loadSongs]); useEffect(() => { diff --git a/app/dialogs/EditSetlist/EditSetlist.tsx b/app/dialogs/EditSetlist/EditSetlist.tsx index 2932f90..d3f0194 100644 --- a/app/dialogs/EditSetlist/EditSetlist.tsx +++ b/app/dialogs/EditSetlist/EditSetlist.tsx @@ -4,7 +4,7 @@ import { Dialog } from "~/components/Dialog"; import { SetlistForm } from "~/forms/setlist"; import { useModalFetcher } from "~/lib/remix-modals"; import { useModal } from "~/lib/remix-modals/useModal"; -import type { loader as SetlistLoader } from "~/routes/setlists/$id/index"; +import type { loader as SetlistLoader } from "~/routes/__app/setlists/$id/index"; export function EditSetlist() { const data = useRouteData>( diff --git a/app/root.tsx b/app/root.tsx index c560a20..f36cc08 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -7,13 +7,8 @@ import { Scripts, ScrollRestoration, } from "@remix-run/react"; -import tailwindStyles from "./styles/tailwind.css"; import globalStyles from "./styles/globals.css"; -import { NavBar } from "./components/NavBar"; -import { ModalRoute, ModalRouter } from "./lib/remix-modals"; -import { NewSetlist } from "./dialogs/NewSetlist/NewSetlist"; -import { EditSetlist } from "./dialogs/EditSetlist/EditSetlist"; -import { AddSongs } from "./dialogs/AddSongs/AddSongs"; +import tailwindStyles from "./styles/tailwind.css"; export const meta: MetaFunction = () => ({ charset: "utf-8", @@ -29,18 +24,10 @@ export default function App() { - -
- -
+ - - } /> - } /> - } /> - ); diff --git a/app/routes/__app.tsx b/app/routes/__app.tsx new file mode 100644 index 0000000..a2ed1a7 --- /dev/null +++ b/app/routes/__app.tsx @@ -0,0 +1,22 @@ +import { Outlet } from "@remix-run/react"; +import { NavBar } from "~/components/NavBar"; +import { AddSongs } from "~/dialogs/AddSongs/AddSongs"; +import { EditSetlist } from "~/dialogs/EditSetlist/EditSetlist"; +import { NewSetlist } from "~/dialogs/NewSetlist/NewSetlist"; +import { ModalRoute, ModalRouter } from "~/lib/remix-modals"; + +export default function App() { + return ( + <> + +
+ +
+ + } /> + } /> + } /> + + + ); +} diff --git a/app/routes/setlists/$id/edit.tsx b/app/routes/__app/setlists/$id/edit.tsx similarity index 100% rename from app/routes/setlists/$id/edit.tsx rename to app/routes/__app/setlists/$id/edit.tsx diff --git a/app/routes/setlists/$id/index.tsx b/app/routes/__app/setlists/$id/index.tsx similarity index 100% rename from app/routes/setlists/$id/index.tsx rename to app/routes/__app/setlists/$id/index.tsx diff --git a/app/routes/setlists/$id/qrcode.tsx b/app/routes/__app/setlists/$id/qrcode.tsx similarity index 100% rename from app/routes/setlists/$id/qrcode.tsx rename to app/routes/__app/setlists/$id/qrcode.tsx diff --git a/app/routes/setlists/$id/update-songs.tsx b/app/routes/__app/setlists/$id/update-songs.tsx similarity index 100% rename from app/routes/setlists/$id/update-songs.tsx rename to app/routes/__app/setlists/$id/update-songs.tsx diff --git a/app/routes/setlists/index.tsx b/app/routes/__app/setlists/index.tsx similarity index 100% rename from app/routes/setlists/index.tsx rename to app/routes/__app/setlists/index.tsx diff --git a/app/routes/setlists/new.tsx b/app/routes/__app/setlists/new.tsx similarity index 100% rename from app/routes/setlists/new.tsx rename to app/routes/__app/setlists/new.tsx diff --git a/app/routes/song/$id/edit.tsx b/app/routes/__app/songs/$id/edit.tsx similarity index 99% rename from app/routes/song/$id/edit.tsx rename to app/routes/__app/songs/$id/edit.tsx index e1961ba..00ea4d5 100644 --- a/app/routes/song/$id/edit.tsx +++ b/app/routes/__app/songs/$id/edit.tsx @@ -34,7 +34,7 @@ export default function EditSong() {

Songs

-
+
diff --git a/app/styles/tailwind.css b/app/styles/tailwind.css index 0bc617e..66e0dca 100644 --- a/app/styles/tailwind.css +++ b/app/styles/tailwind.css @@ -22,7 +22,7 @@ ::before, ::after { - --tw-content: ""; + --tw-content: ''; } /* @@ -41,11 +41,9 @@ html { -moz-tab-size: 4; /* 3 */ -o-tab-size: 4; - tab-size: 4; + tab-size: 4; /* 3 */ - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, - "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, - "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ font-feature-settings: normal; /* 5 */ @@ -84,7 +82,7 @@ Add the correct text decoration in Chrome, Edge, and Safari. abbr:where([title]) { -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; + text-decoration: underline dotted; } /* @@ -128,8 +126,7 @@ code, kbd, samp, pre { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, - "Liberation Mono", "Courier New", monospace; + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ font-size: 1em; /* 2 */ @@ -220,9 +217,9 @@ select { */ button, -[type="button"], -[type="reset"], -[type="submit"] { +[type='button'], +[type='reset'], +[type='submit'] { -webkit-appearance: button; /* 1 */ background-color: transparent; @@ -269,7 +266,7 @@ Correct the cursor style of increment and decrement buttons in Safari. 2. Correct the outline style in Safari. */ -[type="search"] { +[type='search'] { -webkit-appearance: textfield; /* 1 */ outline-offset: -2px; @@ -354,8 +351,7 @@ textarea { 2. Set the default placeholder color to the user's configured gray 400 color. */ -input::-moz-placeholder, -textarea::-moz-placeholder { +input::-moz-placeholder, textarea::-moz-placeholder { opacity: 1; /* 1 */ color: #9ca3af; @@ -423,9 +419,7 @@ video { display: none; } -*, -::before, -::after { +*, ::before, ::after { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; @@ -435,16 +429,16 @@ video { --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); @@ -452,24 +446,24 @@ video { --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; } ::backdrop { @@ -482,16 +476,16 @@ video { --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); @@ -499,24 +493,24 @@ video { --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; } .container { @@ -678,6 +672,10 @@ video { margin-bottom: 0.5rem; } +.mb-4 { + margin-bottom: 1rem; +} + .mr-1 { margin-right: 0.25rem; } @@ -690,10 +688,6 @@ video { margin-right: 0.75rem; } -.mb-4 { - margin-bottom: 1rem; -} - .box-border { box-sizing: border-box; } @@ -788,22 +782,16 @@ video { .-translate-x-9 { --tw-translate-x: -2.25rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .rotate-90 { --tw-rotate: 90deg; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .transform { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .cursor-default { @@ -812,8 +800,8 @@ video { .select-none { -webkit-user-select: none; - -moz-user-select: none; - user-select: none; + -moz-user-select: none; + user-select: none; } .resize-none { @@ -972,6 +960,11 @@ video { border-color: rgb(231 229 228 / var(--tw-border-opacity)); } +.border-stone-500 { + --tw-border-opacity: 1; + border-color: rgb(120 113 108 / var(--tw-border-opacity)); +} + .border-transparent { border-color: transparent; } @@ -981,11 +974,6 @@ video { border-color: rgb(214 211 209 / var(--tw-border-opacity)); } -.border-stone-500 { - --tw-border-opacity: 1; - border-color: rgb(120 113 108 / var(--tw-border-opacity)); -} - .bg-stone-300 { --tw-bg-opacity: 1; background-color: rgb(214 211 209 / var(--tw-bg-opacity)); @@ -1144,21 +1132,6 @@ video { padding-bottom: 2rem; } -.px-8 { - padding-left: 2rem; - padding-right: 2rem; -} - -.py-6 { - padding-top: 1.5rem; - padding-bottom: 1.5rem; -} - -.py-10 { - padding-top: 2.5rem; - padding-bottom: 2.5rem; -} - .pt-4 { padding-top: 1rem; } @@ -1208,8 +1181,7 @@ video { } .font-mono { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, - "Liberation Mono", "Courier New", monospace; + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } .text-sm { @@ -1247,6 +1219,11 @@ video { line-height: 1; } +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} + .text-lg { font-size: 1.125rem; line-height: 1.75rem; @@ -1257,11 +1234,6 @@ video { line-height: 1; } -.text-2xl { - font-size: 1.5rem; - line-height: 2rem; -} - .font-medium { font-weight: 500; } @@ -1374,29 +1346,21 @@ video { } .shadow-xl { - --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), - 0 8px 10px -6px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), - 0 8px 10px -6px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .shadow-lg { - --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), - 0 4px 6px -4px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), - 0 4px 6px -4px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .shadow-md { --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), - 0 2px 4px -2px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .outline-none { @@ -1405,12 +1369,9 @@ video { } .ring-1 { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 - var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 - calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), - var(--tw-shadow, 0 0 #0000); + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .ring-black { @@ -1429,8 +1390,7 @@ video { } .transition-colors { - transition-property: color, background-color, border-color, - text-decoration-color, fill, stroke; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; } @@ -1483,12 +1443,9 @@ video { } .hover\:shadow-xl:hover { - --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), - 0 8px 10px -6px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), - 0 8px 10px -6px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); + --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .focus\:border-stone-400:focus { @@ -1506,12 +1463,9 @@ video { } .focus-visible\:ring-1:focus-visible { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 - var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 - calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), - var(--tw-shadow, 0 0 #0000); + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .focus-visible\:ring-stone-300:focus-visible { From be503636225edb7fdc204ace72a5f2be8ea25538 Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Wed, 25 Jan 2023 16:14:28 -0500 Subject: [PATCH 02/44] Auth navigation setup --- app/components/NavBar/NavBar.tsx | 18 ++----- app/forms/{login-button => login}/index.tsx | 7 ++- app/forms/logout-button.tsx | 11 ----- app/forms/logout/index.tsx | 10 ++++ app/forms/signup/index.tsx | 10 ++++ app/routes/__app/songs/$id/edit.tsx | 9 ++-- app/routes/__app/songs/new.tsx | 6 +-- app/routes/auth/auth0/callback.tsx | 2 +- app/routes/index.tsx | 34 +++++++------- app/styles/tailwind.css | 52 +++++++++++++++------ app/utils/auth.server.ts | 4 +- 11 files changed, 95 insertions(+), 68 deletions(-) rename app/forms/{login-button => login}/index.tsx (53%) delete mode 100644 app/forms/logout-button.tsx create mode 100644 app/forms/logout/index.tsx create mode 100644 app/forms/signup/index.tsx diff --git a/app/components/NavBar/NavBar.tsx b/app/components/NavBar/NavBar.tsx index 78f386c..42329e7 100644 --- a/app/components/NavBar/NavBar.tsx +++ b/app/components/NavBar/NavBar.tsx @@ -1,5 +1,6 @@ -import { Link, NavLink } from "@remix-run/react"; +import { NavLink } from "@remix-run/react"; import React from "react"; +import { LogoutButton } from "~/forms/logout"; type Props = {}; @@ -23,20 +24,7 @@ export const NavBar: React.FC = () => {
- - - +
diff --git a/app/forms/login-button/index.tsx b/app/forms/login/index.tsx similarity index 53% rename from app/forms/login-button/index.tsx rename to app/forms/login/index.tsx index 563903e..32842ba 100644 --- a/app/forms/login-button/index.tsx +++ b/app/forms/login/index.tsx @@ -1,13 +1,16 @@ import { Form } from "@remix-run/react"; +import { Button } from "~/components/Button"; /** * Common log in button handling form * @returns */ -export default function LogInButton() { +export function LoginButton() { return (
- +
); } diff --git a/app/forms/logout-button.tsx b/app/forms/logout-button.tsx deleted file mode 100644 index 3d93167..0000000 --- a/app/forms/logout-button.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Form } from "@remix-run/react"; - -export const LogOutButton = () => { - return ( -
- -
- ); -}; - -export default LogOutButton; diff --git a/app/forms/logout/index.tsx b/app/forms/logout/index.tsx new file mode 100644 index 0000000..de417c5 --- /dev/null +++ b/app/forms/logout/index.tsx @@ -0,0 +1,10 @@ +import { Form } from "@remix-run/react"; +import { Button } from "~/components/Button"; + +export const LogoutButton = () => { + return ( +
+ +
+ ); +}; diff --git a/app/forms/signup/index.tsx b/app/forms/signup/index.tsx new file mode 100644 index 0000000..0475ff2 --- /dev/null +++ b/app/forms/signup/index.tsx @@ -0,0 +1,10 @@ +import { Form } from "@remix-run/react"; +import { Button } from "~/components/Button"; + +export const SignupButton = () => { + return ( +
+ +
+ ); +}; diff --git a/app/routes/__app/songs/$id/edit.tsx b/app/routes/__app/songs/$id/edit.tsx index 00ea4d5..48f8fcc 100644 --- a/app/routes/__app/songs/$id/edit.tsx +++ b/app/routes/__app/songs/$id/edit.tsx @@ -1,7 +1,7 @@ import type { ISong } from "@/types/song"; import type { ActionArgs, LoaderArgs } from "@remix-run/node"; -import { Link, useFetcher } from "@remix-run/react"; -import { typedjson, useTypedLoaderData } from "remix-typedjson"; +import { useFetcher } from "@remix-run/react"; +import { redirect, typedjson, useTypedLoaderData } from "remix-typedjson"; import { ClientOnly } from "remix-utils"; import { Button } from "~/components/Button"; import { getSong, updateSong } from "~/db/song.db"; @@ -13,13 +13,14 @@ import { currentAuthedUser } from "~/utils/auth.server"; export async function loader({ params, request }: LoaderArgs) { if (!params.id) throw new Response("Not Found", { status: 404 }); - const su = await currentAuthedUser(request); + const user = await currentAuthedUser(request); + if (!user) return redirect("/"); const song = await getSong({ id: +params.id }); if (!song) throw new Response("Not Found", { status: 404 }); - if (song.authorId !== su?.id) + if (song.authorId !== user.id) throw new Response("Not Authorized", { status: 401 }); return typedjson({ song }); diff --git a/app/routes/__app/songs/new.tsx b/app/routes/__app/songs/new.tsx index 6f0fa40..0a3b7bb 100644 --- a/app/routes/__app/songs/new.tsx +++ b/app/routes/__app/songs/new.tsx @@ -3,10 +3,10 @@ import { createSong } from "~/db/song.db"; import { currentAuthedUser } from "~/utils/auth.server"; export async function action({ request }: LoaderArgs) { - const su = await currentAuthedUser(request); - + const user = await currentAuthedUser(request); + if (!user) return redirect("/"); const newSong = await createSong({ - authorId: su.id, + authorId: user.id, }); return redirect(`/song/${newSong.id}/edit`); } diff --git a/app/routes/auth/auth0/callback.tsx b/app/routes/auth/auth0/callback.tsx index 77fb72f..ed21e43 100644 --- a/app/routes/auth/auth0/callback.tsx +++ b/app/routes/auth/auth0/callback.tsx @@ -1,4 +1,4 @@ -import type { ActionFunction, LoaderFunction } from "@remix-run/node"; +import type { LoaderFunction } from "@remix-run/node"; import { authenticator } from "~/utils/auth.server"; diff --git a/app/routes/index.tsx b/app/routes/index.tsx index 3e347d0..abf4ebb 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -1,21 +1,23 @@ -import { Form } from "@remix-run/react"; -import Login from "~/forms/login-button"; -import LogOut from "~/forms/logout-button"; +import type { LoaderArgs } from "@remix-run/node"; +import { redirect } from "remix-typedjson"; +import { LoginButton } from "~/forms/login"; +import { SignupButton } from "~/forms/signup"; +import { currentAuthedUser } from "~/utils/auth.server"; -export default function Index() { - return ( -
-

Hello

-
- -
- - -
- -
+export const loader = async ({ request }: LoaderArgs) => { + const currentUser = await currentAuthedUser(request); + if (currentUser) return redirect("/songs"); + return true; +}; - +export default function Landing() { + return ( +
+

👋 Welcome to PubJam

+
+ + +
); } diff --git a/app/styles/tailwind.css b/app/styles/tailwind.css index 66e0dca..8e567d3 100644 --- a/app/styles/tailwind.css +++ b/app/styles/tailwind.css @@ -664,6 +664,10 @@ video { margin-top: 1.5rem; } +.mr-1 { + margin-right: 0.25rem; +} + .mr-2 { margin-right: 0.5rem; } @@ -676,10 +680,6 @@ video { margin-bottom: 1rem; } -.mr-1 { - margin-right: 0.25rem; -} - .mr-4 { margin-right: 1rem; } @@ -688,6 +688,18 @@ video { margin-right: 0.75rem; } +.-mt-4 { + margin-top: -1rem; +} + +.-mt-8 { + margin-top: -2rem; +} + +.-mt-16 { + margin-top: -4rem; +} + .box-border { box-sizing: border-box; } @@ -732,6 +744,10 @@ video { height: 1.25rem; } +.h-screen { + height: 100vh; +} + .max-h-60 { max-height: 15rem; } @@ -812,6 +828,10 @@ video { flex-direction: row-reverse; } +.flex-col { + flex-direction: column; +} + .items-start { align-items: flex-start; } @@ -874,6 +894,12 @@ video { margin-bottom: calc(1.75rem * var(--tw-space-y-reverse)); } +.space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); +} + .divide-y > :not([hidden]) ~ :not([hidden]) { --tw-divide-y-reverse: 0; border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); @@ -960,15 +986,15 @@ video { border-color: rgb(231 229 228 / var(--tw-border-opacity)); } +.border-transparent { + border-color: transparent; +} + .border-stone-500 { --tw-border-opacity: 1; border-color: rgb(120 113 108 / var(--tw-border-opacity)); } -.border-transparent { - border-color: transparent; -} - .border-stone-300 { --tw-border-opacity: 1; border-color: rgb(214 211 209 / var(--tw-border-opacity)); @@ -1102,6 +1128,11 @@ video { padding-bottom: 0px; } +.px-0\.5 { + padding-left: 0.125rem; + padding-right: 0.125rem; +} + .px-7 { padding-left: 1.75rem; padding-right: 1.75rem; @@ -1112,11 +1143,6 @@ video { padding-bottom: 1.25rem; } -.px-0\.5 { - padding-left: 0.125rem; - padding-right: 0.125rem; -} - .px-1 { padding-left: 0.25rem; padding-right: 0.25rem; diff --git a/app/utils/auth.server.ts b/app/utils/auth.server.ts index fbd1cac..b4fc01f 100644 --- a/app/utils/auth.server.ts +++ b/app/utils/auth.server.ts @@ -52,9 +52,7 @@ export const currentAuthedUser = async (request: Request) => { return await __DANGER__DEV__FAKEDAUTH__(); } - return await authenticator.isAuthenticated(request, { - failureRedirect: "/login", - }); + return await authenticator.isAuthenticated(request); }; const __DANGER__DEV__FAKEDAUTH__ = async () => { From 187f8906de6b4ddaf22e195fd595dd462b45a843 Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Wed, 25 Jan 2023 16:23:31 -0500 Subject: [PATCH 03/44] Move forms and dialogs into components folder --- app/components/NavBar/NavBar.tsx | 2 +- app/{ => components}/dialogs/AddSongs/AddSongs.tsx | 0 app/{ => components}/dialogs/EditSetlist/EditSetlist.tsx | 2 +- app/{ => components}/dialogs/NewSetlist/NewSetlist.tsx | 0 app/{ => components}/forms/login/index.tsx | 0 app/{ => components}/forms/logout/index.tsx | 0 app/{ => components}/forms/setlist/SetlistForm.stories.tsx | 0 app/{ => components}/forms/setlist/SetlistForm.test.tsx | 0 app/{ => components}/forms/setlist/SetlistForm.tsx | 0 app/{ => components}/forms/setlist/index.ts | 0 app/{ => components}/forms/signup/index.tsx | 0 .../forms/song/LineFields/LineFields.stories.tsx | 0 .../forms/song/LineFields/LineFields.test.tsx | 0 app/{ => components}/forms/song/LineFields/LineFields.tsx | 0 app/{ => components}/forms/song/LineFields/index.ts | 0 app/{ => components}/forms/song/SongForm.stories.tsx | 0 app/{ => components}/forms/song/SongForm.test.ts | 0 app/{ => components}/forms/song/SongForm.tsx | 0 .../forms/song/StanzaFields/StanzaFields.stories.tsx | 0 .../forms/song/StanzaFields/StanzaFields.test.tsx | 0 .../forms/song/StanzaFields/StanzaFields.tsx | 0 app/{ => components}/forms/song/StanzaFields/index.ts | 0 app/{ => components}/forms/song/index.ts | 0 app/routes/__app.tsx | 6 +++--- app/routes/__app/songs/$id/edit.tsx | 2 +- app/routes/index.tsx | 4 ++-- tsconfig.json | 5 ++++- 27 files changed, 12 insertions(+), 9 deletions(-) rename app/{ => components}/dialogs/AddSongs/AddSongs.tsx (100%) rename app/{ => components}/dialogs/EditSetlist/EditSetlist.tsx (94%) rename app/{ => components}/dialogs/NewSetlist/NewSetlist.tsx (100%) rename app/{ => components}/forms/login/index.tsx (100%) rename app/{ => components}/forms/logout/index.tsx (100%) rename app/{ => components}/forms/setlist/SetlistForm.stories.tsx (100%) rename app/{ => components}/forms/setlist/SetlistForm.test.tsx (100%) rename app/{ => components}/forms/setlist/SetlistForm.tsx (100%) rename app/{ => components}/forms/setlist/index.ts (100%) rename app/{ => components}/forms/signup/index.tsx (100%) rename app/{ => components}/forms/song/LineFields/LineFields.stories.tsx (100%) rename app/{ => components}/forms/song/LineFields/LineFields.test.tsx (100%) rename app/{ => components}/forms/song/LineFields/LineFields.tsx (100%) rename app/{ => components}/forms/song/LineFields/index.ts (100%) rename app/{ => components}/forms/song/SongForm.stories.tsx (100%) rename app/{ => components}/forms/song/SongForm.test.ts (100%) rename app/{ => components}/forms/song/SongForm.tsx (100%) rename app/{ => components}/forms/song/StanzaFields/StanzaFields.stories.tsx (100%) rename app/{ => components}/forms/song/StanzaFields/StanzaFields.test.tsx (100%) rename app/{ => components}/forms/song/StanzaFields/StanzaFields.tsx (100%) rename app/{ => components}/forms/song/StanzaFields/index.ts (100%) rename app/{ => components}/forms/song/index.ts (100%) diff --git a/app/components/NavBar/NavBar.tsx b/app/components/NavBar/NavBar.tsx index 42329e7..600818d 100644 --- a/app/components/NavBar/NavBar.tsx +++ b/app/components/NavBar/NavBar.tsx @@ -1,6 +1,6 @@ import { NavLink } from "@remix-run/react"; import React from "react"; -import { LogoutButton } from "~/forms/logout"; +import { LogoutButton } from "../forms/logout"; type Props = {}; diff --git a/app/dialogs/AddSongs/AddSongs.tsx b/app/components/dialogs/AddSongs/AddSongs.tsx similarity index 100% rename from app/dialogs/AddSongs/AddSongs.tsx rename to app/components/dialogs/AddSongs/AddSongs.tsx diff --git a/app/dialogs/EditSetlist/EditSetlist.tsx b/app/components/dialogs/EditSetlist/EditSetlist.tsx similarity index 94% rename from app/dialogs/EditSetlist/EditSetlist.tsx rename to app/components/dialogs/EditSetlist/EditSetlist.tsx index d3f0194..9ec0bc8 100644 --- a/app/dialogs/EditSetlist/EditSetlist.tsx +++ b/app/components/dialogs/EditSetlist/EditSetlist.tsx @@ -1,7 +1,7 @@ import type { UseDataFunctionReturn } from "remix-typedjson/dist/remix"; import { useRouteData } from "remix-utils"; import { Dialog } from "~/components/Dialog"; -import { SetlistForm } from "~/forms/setlist"; +import { SetlistForm } from "forms/setlist"; import { useModalFetcher } from "~/lib/remix-modals"; import { useModal } from "~/lib/remix-modals/useModal"; import type { loader as SetlistLoader } from "~/routes/__app/setlists/$id/index"; diff --git a/app/dialogs/NewSetlist/NewSetlist.tsx b/app/components/dialogs/NewSetlist/NewSetlist.tsx similarity index 100% rename from app/dialogs/NewSetlist/NewSetlist.tsx rename to app/components/dialogs/NewSetlist/NewSetlist.tsx diff --git a/app/forms/login/index.tsx b/app/components/forms/login/index.tsx similarity index 100% rename from app/forms/login/index.tsx rename to app/components/forms/login/index.tsx diff --git a/app/forms/logout/index.tsx b/app/components/forms/logout/index.tsx similarity index 100% rename from app/forms/logout/index.tsx rename to app/components/forms/logout/index.tsx diff --git a/app/forms/setlist/SetlistForm.stories.tsx b/app/components/forms/setlist/SetlistForm.stories.tsx similarity index 100% rename from app/forms/setlist/SetlistForm.stories.tsx rename to app/components/forms/setlist/SetlistForm.stories.tsx diff --git a/app/forms/setlist/SetlistForm.test.tsx b/app/components/forms/setlist/SetlistForm.test.tsx similarity index 100% rename from app/forms/setlist/SetlistForm.test.tsx rename to app/components/forms/setlist/SetlistForm.test.tsx diff --git a/app/forms/setlist/SetlistForm.tsx b/app/components/forms/setlist/SetlistForm.tsx similarity index 100% rename from app/forms/setlist/SetlistForm.tsx rename to app/components/forms/setlist/SetlistForm.tsx diff --git a/app/forms/setlist/index.ts b/app/components/forms/setlist/index.ts similarity index 100% rename from app/forms/setlist/index.ts rename to app/components/forms/setlist/index.ts diff --git a/app/forms/signup/index.tsx b/app/components/forms/signup/index.tsx similarity index 100% rename from app/forms/signup/index.tsx rename to app/components/forms/signup/index.tsx diff --git a/app/forms/song/LineFields/LineFields.stories.tsx b/app/components/forms/song/LineFields/LineFields.stories.tsx similarity index 100% rename from app/forms/song/LineFields/LineFields.stories.tsx rename to app/components/forms/song/LineFields/LineFields.stories.tsx diff --git a/app/forms/song/LineFields/LineFields.test.tsx b/app/components/forms/song/LineFields/LineFields.test.tsx similarity index 100% rename from app/forms/song/LineFields/LineFields.test.tsx rename to app/components/forms/song/LineFields/LineFields.test.tsx diff --git a/app/forms/song/LineFields/LineFields.tsx b/app/components/forms/song/LineFields/LineFields.tsx similarity index 100% rename from app/forms/song/LineFields/LineFields.tsx rename to app/components/forms/song/LineFields/LineFields.tsx diff --git a/app/forms/song/LineFields/index.ts b/app/components/forms/song/LineFields/index.ts similarity index 100% rename from app/forms/song/LineFields/index.ts rename to app/components/forms/song/LineFields/index.ts diff --git a/app/forms/song/SongForm.stories.tsx b/app/components/forms/song/SongForm.stories.tsx similarity index 100% rename from app/forms/song/SongForm.stories.tsx rename to app/components/forms/song/SongForm.stories.tsx diff --git a/app/forms/song/SongForm.test.ts b/app/components/forms/song/SongForm.test.ts similarity index 100% rename from app/forms/song/SongForm.test.ts rename to app/components/forms/song/SongForm.test.ts diff --git a/app/forms/song/SongForm.tsx b/app/components/forms/song/SongForm.tsx similarity index 100% rename from app/forms/song/SongForm.tsx rename to app/components/forms/song/SongForm.tsx diff --git a/app/forms/song/StanzaFields/StanzaFields.stories.tsx b/app/components/forms/song/StanzaFields/StanzaFields.stories.tsx similarity index 100% rename from app/forms/song/StanzaFields/StanzaFields.stories.tsx rename to app/components/forms/song/StanzaFields/StanzaFields.stories.tsx diff --git a/app/forms/song/StanzaFields/StanzaFields.test.tsx b/app/components/forms/song/StanzaFields/StanzaFields.test.tsx similarity index 100% rename from app/forms/song/StanzaFields/StanzaFields.test.tsx rename to app/components/forms/song/StanzaFields/StanzaFields.test.tsx diff --git a/app/forms/song/StanzaFields/StanzaFields.tsx b/app/components/forms/song/StanzaFields/StanzaFields.tsx similarity index 100% rename from app/forms/song/StanzaFields/StanzaFields.tsx rename to app/components/forms/song/StanzaFields/StanzaFields.tsx diff --git a/app/forms/song/StanzaFields/index.ts b/app/components/forms/song/StanzaFields/index.ts similarity index 100% rename from app/forms/song/StanzaFields/index.ts rename to app/components/forms/song/StanzaFields/index.ts diff --git a/app/forms/song/index.ts b/app/components/forms/song/index.ts similarity index 100% rename from app/forms/song/index.ts rename to app/components/forms/song/index.ts diff --git a/app/routes/__app.tsx b/app/routes/__app.tsx index a2ed1a7..261ad3a 100644 --- a/app/routes/__app.tsx +++ b/app/routes/__app.tsx @@ -1,8 +1,8 @@ import { Outlet } from "@remix-run/react"; import { NavBar } from "~/components/NavBar"; -import { AddSongs } from "~/dialogs/AddSongs/AddSongs"; -import { EditSetlist } from "~/dialogs/EditSetlist/EditSetlist"; -import { NewSetlist } from "~/dialogs/NewSetlist/NewSetlist"; +import { AddSongs } from "~/components/dialogs/AddSongs/AddSongs"; +import { EditSetlist } from "~/components/dialogs/EditSetlist/EditSetlist"; +import { NewSetlist } from "~/components/dialogs/NewSetlist/NewSetlist"; import { ModalRoute, ModalRouter } from "~/lib/remix-modals"; export default function App() { diff --git a/app/routes/__app/songs/$id/edit.tsx b/app/routes/__app/songs/$id/edit.tsx index 48f8fcc..78355a6 100644 --- a/app/routes/__app/songs/$id/edit.tsx +++ b/app/routes/__app/songs/$id/edit.tsx @@ -5,7 +5,7 @@ import { redirect, typedjson, useTypedLoaderData } from "remix-typedjson"; import { ClientOnly } from "remix-utils"; import { Button } from "~/components/Button"; import { getSong, updateSong } from "~/db/song.db"; -import { SongForm } from "~/forms/song"; +import { SongForm } from "forms/song"; import { formDataToJson } from "~/helpers/formDataToJson"; import { useAutoSave } from "~/lib/useAutoSave"; import { currentAuthedUser } from "~/utils/auth.server"; diff --git a/app/routes/index.tsx b/app/routes/index.tsx index abf4ebb..8d3bd8a 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -1,7 +1,7 @@ import type { LoaderArgs } from "@remix-run/node"; import { redirect } from "remix-typedjson"; -import { LoginButton } from "~/forms/login"; -import { SignupButton } from "~/forms/signup"; +import { LoginButton } from "forms/login"; +import { SignupButton } from "forms/signup"; import { currentAuthedUser } from "~/utils/auth.server"; export const loader = async ({ request }: LoaderArgs) => { diff --git a/tsconfig.json b/tsconfig.json index 6914537..7382507 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,10 @@ "paths": { "~/*": ["./app/*"], "@/*": ["./*"], - "lib/*": ["app/lib/*"] + "lib/*": ["app/lib/*"], + "components/*": ["app/components/*"], + "forms/*": ["app/components/forms/*"], + "dialogs/*": ["app/components/dialogs/*"] }, "skipLibCheck": true, "noEmit": true, From 03963b5ba768bf950c5edf44bd1ff2a36b8a52f1 Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Wed, 25 Jan 2023 16:54:53 -0500 Subject: [PATCH 04/44] Remove login page and add requireAuthentication helper --- .../dialogs/NewSetlist/NewSetlist.tsx | 2 +- app/routes/__app/songs/index.tsx | 6 +++++- app/routes/index.tsx | 2 +- app/routes/login.tsx | 18 ------------------ app/routes/logout.tsx | 3 ++- app/utils/auth.server.ts | 11 +++++++++++ 6 files changed, 20 insertions(+), 22 deletions(-) delete mode 100644 app/routes/login.tsx diff --git a/app/components/dialogs/NewSetlist/NewSetlist.tsx b/app/components/dialogs/NewSetlist/NewSetlist.tsx index 5962d30..81d61fa 100644 --- a/app/components/dialogs/NewSetlist/NewSetlist.tsx +++ b/app/components/dialogs/NewSetlist/NewSetlist.tsx @@ -1,5 +1,5 @@ import { Dialog } from "~/components/Dialog"; -import { SetlistForm } from "~/forms/setlist"; +import { SetlistForm } from "forms/setlist"; import { useModalFetcher } from "~/lib/remix-modals"; import { useModal } from "~/lib/remix-modals/useModal"; diff --git a/app/routes/__app/songs/index.tsx b/app/routes/__app/songs/index.tsx index 9b1675f..ecf2cd5 100644 --- a/app/routes/__app/songs/index.tsx +++ b/app/routes/__app/songs/index.tsx @@ -1,13 +1,17 @@ import { PlusIcon } from "@heroicons/react/24/solid"; import type { Song } from "@prisma/client"; +import type { LoaderArgs } from "@remix-run/node"; import { Form, Link } from "@remix-run/react"; import { typedjson, useTypedLoaderData } from "remix-typedjson"; import { Button } from "~/components/Button"; import { Search } from "~/components/Search"; import { getSongs } from "~/db/song.db"; import { useSearch } from "~/lib/useSearch"; +import { requireAuthentication } from "~/utils/auth.server"; -export async function loader() { +export async function loader({ request }: LoaderArgs) { + const user = await requireAuthentication(request); + console.log(user); return typedjson({ songs: await getSongs() }); } diff --git a/app/routes/index.tsx b/app/routes/index.tsx index 8d3bd8a..48a662b 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -1,7 +1,7 @@ import type { LoaderArgs } from "@remix-run/node"; -import { redirect } from "remix-typedjson"; import { LoginButton } from "forms/login"; import { SignupButton } from "forms/signup"; +import { redirect } from "remix-typedjson"; import { currentAuthedUser } from "~/utils/auth.server"; export const loader = async ({ request }: LoaderArgs) => { diff --git a/app/routes/login.tsx b/app/routes/login.tsx deleted file mode 100644 index 6127d81..0000000 --- a/app/routes/login.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { Form } from "@remix-run/react"; - -/** - * static login page - * @returns - */ -export default function Login() { - return ( -
-
- -
-
- -
-
- ); -} diff --git a/app/routes/logout.tsx b/app/routes/logout.tsx index 3bcf4df..455a02a 100644 --- a/app/routes/logout.tsx +++ b/app/routes/logout.tsx @@ -3,7 +3,8 @@ import type { ActionFunction, LoaderFunction } from "@remix-run/node"; import { redirect } from "@remix-run/node"; import { destroySession, getSession } from "~/services/session.server"; -export let loader: LoaderFunction = () => redirect("/login"); + +export let loader: LoaderFunction = () => redirect("/"); const logoutURL = new URL( `https://${process.env.AUTH0_ISSUERBASEURL}/v2/logout` diff --git a/app/utils/auth.server.ts b/app/utils/auth.server.ts index b4fc01f..861033a 100644 --- a/app/utils/auth.server.ts +++ b/app/utils/auth.server.ts @@ -1,6 +1,9 @@ +import { User } from "@prisma/client"; +import { AppData } from "@remix-run/node"; import { Authenticator } from "remix-auth"; import type { Auth0StrategyOptions } from "remix-auth-auth0"; import { Auth0Strategy } from "remix-auth-auth0"; +import { redirect } from "remix-typedjson"; import { prisma } from "~/db/db.server"; import { sessionStorage } from "~/services/session.server"; @@ -76,3 +79,11 @@ export const processAuthentication = async (request: Request) => { return authenticator.authenticate("auth0", request); }; + +export const requireAuthentication = async (request: Request) => { + const currentUser = await currentAuthedUser(request); + if (!currentUser) throw redirect("/logout"); + const user = await prisma.user.findFirst({ where: { id: currentUser.id } }); + if (!user) throw redirect("/logout"); + return user; +}; From 3470818297d8941807d0c805f3c33849aabcb07f Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Wed, 25 Jan 2023 17:16:39 -0500 Subject: [PATCH 05/44] Add some icons to buttons --- app/components/forms/login/index.tsx | 6 +++++- app/components/forms/signup/index.tsx | 8 +++++++- app/routes/auth/auth0/callback.tsx | 4 ++-- app/routes/index.tsx | 2 +- app/styles/tailwind.css | 16 ++++++++++++++++ 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/app/components/forms/login/index.tsx b/app/components/forms/login/index.tsx index 32842ba..83a0d07 100644 --- a/app/components/forms/login/index.tsx +++ b/app/components/forms/login/index.tsx @@ -1,3 +1,4 @@ +import { ArrowRightOnRectangleIcon } from "@heroicons/react/24/solid"; import { Form } from "@remix-run/react"; import { Button } from "~/components/Button"; @@ -8,7 +9,10 @@ import { Button } from "~/components/Button"; export function LoginButton() { return (
-
diff --git a/app/components/forms/signup/index.tsx b/app/components/forms/signup/index.tsx index 0475ff2..bbf07f7 100644 --- a/app/components/forms/signup/index.tsx +++ b/app/components/forms/signup/index.tsx @@ -1,10 +1,16 @@ +import { UserPlusIcon } from "@heroicons/react/24/outline"; import { Form } from "@remix-run/react"; import { Button } from "~/components/Button"; export const SignupButton = () => { return (
- +
); }; diff --git a/app/routes/auth/auth0/callback.tsx b/app/routes/auth/auth0/callback.tsx index ed21e43..fc5e633 100644 --- a/app/routes/auth/auth0/callback.tsx +++ b/app/routes/auth/auth0/callback.tsx @@ -4,7 +4,7 @@ import { authenticator } from "~/utils/auth.server"; export let loader: LoaderFunction = ({ request }) => { return authenticator.authenticate("auth0", request, { - successRedirect: "/", - failureRedirect: "/login", + successRedirect: "/songs", + failureRedirect: "/", }); }; diff --git a/app/routes/index.tsx b/app/routes/index.tsx index 48a662b..6832623 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -14,7 +14,7 @@ export default function Landing() { return (

👋 Welcome to PubJam

-
+
diff --git a/app/styles/tailwind.css b/app/styles/tailwind.css index 8e567d3..7402507 100644 --- a/app/styles/tailwind.css +++ b/app/styles/tailwind.css @@ -1554,6 +1554,22 @@ video { max-width: 28rem; } + .md\:flex-row { + flex-direction: row; + } + + .md\:space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); + } + + .md\:space-y-0 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0px * var(--tw-space-y-reverse)); + } + .md\:px-0 { padding-left: 0px; padding-right: 0px; From 189e67751bc1bd3feac22de5e1548bedd2c04f8b Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Wed, 25 Jan 2023 17:17:59 -0500 Subject: [PATCH 06/44] More spacing between marking input and left and right arrows --- app/components/MarkingInput/MarkingInput.tsx | 4 ++-- app/styles/tailwind.css | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/components/MarkingInput/MarkingInput.tsx b/app/components/MarkingInput/MarkingInput.tsx index 85dee17..12e0cdd 100644 --- a/app/components/MarkingInput/MarkingInput.tsx +++ b/app/components/MarkingInput/MarkingInput.tsx @@ -53,7 +53,7 @@ export const MarkingInput: React.FC = ({ marking, deleteMark }) => { variant="text" icon size="sm" - className="absolute -left-8 -top-0.5 hidden group-focus-within/marking:block" + className="absolute -left-9 -top-0.5 hidden group-focus-within/marking:block" onClick={moveLeft} > @@ -72,7 +72,7 @@ export const MarkingInput: React.FC = ({ marking, deleteMark }) => { variant="text" icon size="sm" - className="absolute -right-8 -top-0.5 hidden group-focus-within/marking:block" + className="absolute -right-9 -top-0.5 hidden group-focus-within/marking:block" onClick={moveRight} > diff --git a/app/styles/tailwind.css b/app/styles/tailwind.css index 7402507..520d030 100644 --- a/app/styles/tailwind.css +++ b/app/styles/tailwind.css @@ -631,6 +631,14 @@ video { top: 1rem; } +.-left-9 { + left: -2.25rem; +} + +.-right-9 { + right: -2.25rem; +} + .z-10 { z-index: 10; } From 1e15d5076f0ced1fc01690a0b001e106f76b915d Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Wed, 25 Jan 2023 17:19:49 -0500 Subject: [PATCH 07/44] More path refactoring for songs --- app/routes/__app/setlists/$id/index.tsx | 2 +- app/routes/__app/songs/$id/edit.tsx | 2 +- app/routes/__app/songs/$id/index.tsx | 2 +- app/routes/__app/songs/new.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/routes/__app/setlists/$id/index.tsx b/app/routes/__app/setlists/$id/index.tsx index 72f07ec..2d9bfca 100644 --- a/app/routes/__app/setlists/$id/index.tsx +++ b/app/routes/__app/setlists/$id/index.tsx @@ -193,7 +193,7 @@ const SetlistSong: React.FC<{ {({ active }) => (
Date: Wed, 25 Jan 2023 17:31:33 -0500 Subject: [PATCH 08/44] Markings fix --- .../forms/song/LineFields/LineFields.tsx | 6 +- .../forms/song/StanzaFields/StanzaFields.tsx | 17 +-- app/routes/__app/songs/$id/edit.tsx | 33 ++--- app/styles/tailwind.css | 126 ++++++------------ 4 files changed, 59 insertions(+), 123 deletions(-) diff --git a/app/components/forms/song/LineFields/LineFields.tsx b/app/components/forms/song/LineFields/LineFields.tsx index 8270c8a..1fbd676 100644 --- a/app/components/forms/song/LineFields/LineFields.tsx +++ b/app/components/forms/song/LineFields/LineFields.tsx @@ -21,7 +21,11 @@ export const LineFields: React.FC = ({ insertLine, deleteLine, }) => { - const { items: markingsFieldArray, push, remove } = useArray(line.markings); + const { + items: markingsFieldArray, + push, + remove, + } = useArray(line.markings || []); const markingButtonArray = new Array( Math.max(line.lyrics.length + 1, 50) ).fill(true); diff --git a/app/components/forms/song/StanzaFields/StanzaFields.tsx b/app/components/forms/song/StanzaFields/StanzaFields.tsx index dc919e1..23e0743 100644 --- a/app/components/forms/song/StanzaFields/StanzaFields.tsx +++ b/app/components/forms/song/StanzaFields/StanzaFields.tsx @@ -1,5 +1,6 @@ import { createMockStanza } from "@/test/factories/song.factory"; import type { IStanza } from "@/types/song"; +import { TrashIcon } from "@heroicons/react/24/solid"; import { Input } from "~/components/Input"; import { Select } from "~/components/Select"; import { Fieldset, useNamespace } from "~/lib/fieldset"; @@ -63,21 +64,7 @@ export const StanzaFields: React.FC<{ onClick={confirmAndDelete} > - - - + Delete diff --git a/app/routes/__app/songs/$id/edit.tsx b/app/routes/__app/songs/$id/edit.tsx index 33b70f0..525347c 100644 --- a/app/routes/__app/songs/$id/edit.tsx +++ b/app/routes/__app/songs/$id/edit.tsx @@ -1,23 +1,25 @@ import type { ISong } from "@/types/song"; +import { EyeIcon } from "@heroicons/react/24/outline"; import type { ActionArgs, LoaderArgs } from "@remix-run/node"; import { useFetcher } from "@remix-run/react"; -import { redirect, typedjson, useTypedLoaderData } from "remix-typedjson"; +import { SongForm } from "forms/song"; +import { typedjson, useTypedLoaderData } from "remix-typedjson"; import { ClientOnly } from "remix-utils"; import { Button } from "~/components/Button"; import { getSong, updateSong } from "~/db/song.db"; -import { SongForm } from "forms/song"; import { formDataToJson } from "~/helpers/formDataToJson"; import { useAutoSave } from "~/lib/useAutoSave"; -import { currentAuthedUser } from "~/utils/auth.server"; +import { requireAuthentication } from "~/utils/auth.server"; export async function loader({ params, request }: LoaderArgs) { if (!params.id) throw new Response("Not Found", { status: 404 }); - const user = await currentAuthedUser(request); - if (!user) return redirect("/"); + const user = await requireAuthentication(request); const song = await getSong({ id: +params.id }); + console.log(song); + if (!song) throw new Response("Not Found", { status: 404 }); if (song.authorId !== user.id) @@ -68,26 +70,7 @@ export default function EditSong() { className="inline-flex items-center text-sm" > - - - - + View diff --git a/app/styles/tailwind.css b/app/styles/tailwind.css index 520d030..33d88ce 100644 --- a/app/styles/tailwind.css +++ b/app/styles/tailwind.css @@ -551,10 +551,6 @@ video { pointer-events: none; } -.static { - position: static; -} - .fixed { position: fixed; } @@ -607,8 +603,8 @@ video { bottom: 0px; } -.-left-8 { - left: -2rem; +.-left-9 { + left: -2.25rem; } .-top-0\.5 { @@ -619,8 +615,8 @@ video { top: -0px; } -.-right-8 { - right: -2rem; +.-right-9 { + right: -2.25rem; } .right-4 { @@ -631,14 +627,6 @@ video { top: 1rem; } -.-left-9 { - left: -2.25rem; -} - -.-right-9 { - right: -2.25rem; -} - .z-10 { z-index: 10; } @@ -656,6 +644,10 @@ video { margin-right: auto; } +.mb-4 { + margin-bottom: 1rem; +} + .mt-2 { margin-top: 0.5rem; } @@ -668,24 +660,20 @@ video { margin-top: 0.25rem; } -.mt-6 { - margin-top: 1.5rem; -} - -.mr-1 { - margin-right: 0.25rem; -} - .mr-2 { margin-right: 0.5rem; } +.mt-6 { + margin-top: 1.5rem; +} + .mb-2 { margin-bottom: 0.5rem; } -.mb-4 { - margin-bottom: 1rem; +.mr-1 { + margin-right: 0.25rem; } .mr-4 { @@ -696,18 +684,6 @@ video { margin-right: 0.75rem; } -.-mt-4 { - margin-top: -1rem; -} - -.-mt-8 { - margin-top: -2rem; -} - -.-mt-16 { - margin-top: -4rem; -} - .box-border { box-sizing: border-box; } @@ -732,6 +708,10 @@ video { display: none; } +.h-screen { + height: 100vh; +} + .h-full { height: 100%; } @@ -740,10 +720,6 @@ video { height: 2rem; } -.h-6 { - height: 1.5rem; -} - .h-2 { height: 0.5rem; } @@ -752,10 +728,6 @@ video { height: 1.25rem; } -.h-screen { - height: 100vh; -} - .max-h-60 { max-height: 15rem; } @@ -776,10 +748,6 @@ video { width: auto; } -.w-6 { - width: 1.5rem; -} - .w-28 { width: 7rem; } @@ -860,6 +828,12 @@ video { justify-content: center; } +.space-y-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); +} + .space-x-4 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(1rem * var(--tw-space-x-reverse)); @@ -878,12 +852,6 @@ video { margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); } -.space-y-3 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); -} - .space-y-4 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); @@ -902,12 +870,6 @@ video { margin-bottom: calc(1.75rem * var(--tw-space-y-reverse)); } -.space-x-3 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0.75rem * var(--tw-space-x-reverse)); - margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); -} - .divide-y > :not([hidden]) ~ :not([hidden]) { --tw-divide-y-reverse: 0; border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); @@ -994,15 +956,15 @@ video { border-color: rgb(231 229 228 / var(--tw-border-opacity)); } -.border-transparent { - border-color: transparent; -} - .border-stone-500 { --tw-border-opacity: 1; border-color: rgb(120 113 108 / var(--tw-border-opacity)); } +.border-transparent { + border-color: transparent; +} + .border-stone-300 { --tw-border-opacity: 1; border-color: rgb(214 211 209 / var(--tw-border-opacity)); @@ -1136,11 +1098,6 @@ video { padding-bottom: 0px; } -.px-0\.5 { - padding-left: 0.125rem; - padding-right: 0.125rem; -} - .px-7 { padding-left: 1.75rem; padding-right: 1.75rem; @@ -1151,6 +1108,11 @@ video { padding-bottom: 1.25rem; } +.px-0\.5 { + padding-left: 0.125rem; + padding-right: 0.125rem; +} + .px-1 { padding-left: 0.25rem; padding-right: 0.25rem; @@ -1218,16 +1180,16 @@ video { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } -.text-sm { - font-size: 0.875rem; - line-height: 1.25rem; -} - .text-3xl { font-size: 1.875rem; line-height: 2.25rem; } +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} + .text-base { font-size: 1rem; line-height: 1.5rem; @@ -1566,18 +1528,18 @@ video { flex-direction: row; } - .md\:space-x-3 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0.75rem * var(--tw-space-x-reverse)); - margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); - } - .md\:space-y-0 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0px * var(--tw-space-y-reverse)); } + .md\:space-x-3 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); + } + .md\:px-0 { padding-left: 0px; padding-right: 0px; From a93b4751faf3a70d17ebaf5676a6e781a606e86d Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Wed, 25 Jan 2023 17:35:17 -0500 Subject: [PATCH 09/44] Get rid of console log --- app/routes/__app/songs/$id/edit.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/routes/__app/songs/$id/edit.tsx b/app/routes/__app/songs/$id/edit.tsx index 525347c..ce48455 100644 --- a/app/routes/__app/songs/$id/edit.tsx +++ b/app/routes/__app/songs/$id/edit.tsx @@ -18,8 +18,6 @@ export async function loader({ params, request }: LoaderArgs) { const song = await getSong({ id: +params.id }); - console.log(song); - if (!song) throw new Response("Not Found", { status: 404 }); if (song.authorId !== user.id) From 2b0fbf7403a8aeb720fd7e9f2de610545d60c611 Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Wed, 25 Jan 2023 17:46:46 -0500 Subject: [PATCH 10/44] Fix add remove sons to setlist --- app/components/dialogs/AddSongs/AddSongs.tsx | 3 ++- app/components/dialogs/EditSetlist/EditSetlist.tsx | 2 +- app/routes/__app/setlists/$id/update-songs.tsx | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/components/dialogs/AddSongs/AddSongs.tsx b/app/components/dialogs/AddSongs/AddSongs.tsx index 8282fc6..514e49b 100644 --- a/app/components/dialogs/AddSongs/AddSongs.tsx +++ b/app/components/dialogs/AddSongs/AddSongs.tsx @@ -15,8 +15,9 @@ import type { loader as SetlistLoader } from "~/routes/__app/setlists/$id/index" export function AddSongs() { const setlistData = useRouteData>( - "routes/setlists/$id/index" + "routes/__app/setlists/$id/index" ); + const { Form, action } = useModalFetcher( `/setlists/${setlistData?.setlist.id}/update-songs` ); diff --git a/app/components/dialogs/EditSetlist/EditSetlist.tsx b/app/components/dialogs/EditSetlist/EditSetlist.tsx index 9ec0bc8..ba1c578 100644 --- a/app/components/dialogs/EditSetlist/EditSetlist.tsx +++ b/app/components/dialogs/EditSetlist/EditSetlist.tsx @@ -8,7 +8,7 @@ import type { loader as SetlistLoader } from "~/routes/__app/setlists/$id/index" export function EditSetlist() { const data = useRouteData>( - "routes/setlists/$id/index" + "routes/__app/setlists/$id/index" ); const { isOpen, close } = useModal(); diff --git a/app/routes/__app/setlists/$id/update-songs.tsx b/app/routes/__app/setlists/$id/update-songs.tsx index 4988ab1..9d245df 100644 --- a/app/routes/__app/setlists/$id/update-songs.tsx +++ b/app/routes/__app/setlists/$id/update-songs.tsx @@ -26,6 +26,7 @@ export async function action({ request, params }: ActionArgs) { }); return typedjson({ setlist }); } catch (e) { + console.error(e); throw new Response("Internal error", { status: 500 }); } } From f01a109f3f928a6b1c4ca6be05af6b3a348c3c09 Mon Sep 17 00:00:00 2001 From: Keith Stolte Date: Wed, 25 Jan 2023 19:54:08 -0500 Subject: [PATCH 11/44] fix: need to numberify the string of local dev offline mode --- app/utils/auth.server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/auth.server.ts b/app/utils/auth.server.ts index 861033a..3bf6371 100644 --- a/app/utils/auth.server.ts +++ b/app/utils/auth.server.ts @@ -63,7 +63,7 @@ const __DANGER__DEV__FAKEDAUTH__ = async () => { "currently running in local dev mode and skipping auth0 authorization." ); return (await prisma.user.findUniqueOrThrow({ - where: { id: process.env.SKIPAUTH_USERID }, + where: { id: +process.env.SKIPAUTH_USERID }, })) as SessionUser; }; From 1835a279b4679f7cc2a7bbab6eaa6aa9b4adf27c Mon Sep 17 00:00:00 2001 From: Keith Stolte Date: Thu, 26 Jan 2023 10:30:54 -0500 Subject: [PATCH 12/44] Adding Sentry.io for diagnostics and performance (#12) --- app/entry.client.tsx | 20 +- app/entry.server.tsx | 20 +- app/root.tsx | 5 +- package-lock.json | 941 +++++++++++++++++++++++++++++++++++++++---- package.json | 3 +- 5 files changed, 915 insertions(+), 74 deletions(-) diff --git a/app/entry.client.tsx b/app/entry.client.tsx index f1fed31..bfc7b7f 100644 --- a/app/entry.client.tsx +++ b/app/entry.client.tsx @@ -1,7 +1,23 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; +import { RemixBrowser, useLocation, useMatches } from "@remix-run/react"; +import { startTransition, StrictMode, useEffect } from "react"; import { hydrateRoot } from "react-dom/client"; +import * as Sentry from "@sentry/remix"; + +Sentry.init({ + dsn: process.env.SENTRY_DSN, + tracesSampleRate: 1, + integrations: [ + new Sentry.BrowserTracing({ + routingInstrumentation: Sentry.remixRouterInstrumentation( + useEffect, + useLocation, + useMatches + ), + }), + ], +}); + function hydrate() { startTransition(() => { hydrateRoot( diff --git a/app/entry.server.tsx b/app/entry.server.tsx index fb8ea87..128512e 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -1,6 +1,24 @@ import type { EntryContext } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; +import { RemixServer, useLocation, useMatches } from "@remix-run/react"; import { renderToString } from "react-dom/server"; +import * as Sentry from "@sentry/remix"; +import { useEffect } from "react"; +import { prisma } from "~/db/db.server"; + +Sentry.init({ + dsn: process.env.SENTRY_DSN, + tracesSampleRate: 1, + integrations: [ + new Sentry.BrowserTracing({ + routingInstrumentation: Sentry.remixRouterInstrumentation( + useEffect, + useLocation, + useMatches + ), + }), + new Sentry.Integrations.Prisma({ client: prisma }), + ], +}); export default function handleRequest( request: Request, diff --git a/app/root.tsx b/app/root.tsx index f36cc08..3ad5212 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -9,6 +9,7 @@ import { } from "@remix-run/react"; import globalStyles from "./styles/globals.css"; import tailwindStyles from "./styles/tailwind.css"; +import { withSentry } from "@sentry/remix"; export const meta: MetaFunction = () => ({ charset: "utf-8", @@ -16,7 +17,7 @@ export const meta: MetaFunction = () => ({ viewport: "width=device-width,initial-scale=1", }); -export default function App() { +function App() { return ( @@ -39,3 +40,5 @@ export function links() { { rel: "stylesheet", href: globalStyles }, ]; } + +export default withSentry(App); diff --git a/package-lock.json b/package-lock.json index 236ec1c..dcee90e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@remix-run/node": "^1.7.6", "@remix-run/react": "^1.7.6", "@remix-validated-form/with-zod": "^2.0.5", + "@sentry/remix": "^7.33.0", "cross-env": "^7.0.3", "debounce": "^1.2.1", "dotenv-cli": "^6.0.0", @@ -3028,6 +3029,332 @@ "integrity": "sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==", "dev": true }, + "node_modules/@sentry/browser": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.33.0.tgz", + "integrity": "sha512-bvExBTyLb7cLWLkHh0gch2W/oSw08Yo8DgEc+KkikOnvWd/xoEWUsYNydYGzV+bL1jqcOErsZy0fVsbzTmh71g==", + "dependencies": { + "@sentry/core": "7.33.0", + "@sentry/replay": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/cli": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.2.0.tgz", + "integrity": "sha512-ywFtB8VHyWN248LuM67fsRtdMLif/SOHYY3zyef5WybvnAmRLDmGTWK//hSUCebsHBpehRIkmt4iMiyUXwgd5w==", + "hasInstallScript": true, + "dependencies": { + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.7", + "npmlog": "^6.0.1", + "progress": "^2.0.3", + "proxy-from-env": "^1.1.0", + "which": "^2.0.2" + }, + "bin": { + "sentry-cli": "bin/sentry-cli" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@sentry/core": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.33.0.tgz", + "integrity": "sha512-mrSgUnXjxHVi0cVea1lv7gC/Y66ya2a3atCHaPEij/+l+3APg5d0Ixt1zMx5YllMiZKf6wpxlZ0uwXcqdAAw+w==", + "dependencies": { + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/integrations": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.33.0.tgz", + "integrity": "sha512-r67/9R+DaOZETg7gRvOuYPo5XQdzEaE8f7OaET071dUP0kyUBjO74Y7SZxZV/xjBthMXexw5TANHmLVrZQQVag==", + "dependencies": { + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "localforage": "^1.8.1", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/node": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.33.0.tgz", + "integrity": "sha512-isQVF9LLSG4EZLHiSJ3chgK6f3ZBdGxm8fX6YGm8HWz07CubJddes3yBPLPRNXrRLd7X3SK8pPcK5oc3LIKqAw==", + "dependencies": { + "@sentry/core": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", + "lru_map": "^0.3.3", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/react": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.33.0.tgz", + "integrity": "sha512-uLgH4Frg6QhST8wj+3F7JvfKPAGkxYl2cessl3KQiYv4lB0x7BpRMQ5PA9X2c6CwiQArNiwy7p+NjrUV6gIcFg==", + "dependencies": { + "@sentry/browser": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "hoist-non-react-statics": "^3.3.2", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "react": "15.x || 16.x || 17.x || 18.x" + } + }, + "node_modules/@sentry/remix": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/remix/-/remix-7.33.0.tgz", + "integrity": "sha512-Pcr6sssnLIDBelMlb4HJu3J2N94UdRhTGhmELGJvUhvT2GbYVZ9s94/2LdT//j5viRncuvMtfRoOQfJX/Us+3w==", + "dependencies": { + "@sentry/cli": "2.2.0", + "@sentry/core": "7.33.0", + "@sentry/integrations": "7.33.0", + "@sentry/node": "7.33.0", + "@sentry/react": "7.33.0", + "@sentry/tracing": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "@sentry/webpack-plugin": "1.19.0", + "tslib": "^1.9.3", + "yargs": "^17.6.0" + }, + "bin": { + "sentry-upload-sourcemaps": "scripts/sentry-upload-sourcemaps.js" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@remix-run/node": "1.x", + "@remix-run/react": "1.x", + "react": "16.x || 17.x || 18.x" + } + }, + "node_modules/@sentry/replay": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.33.0.tgz", + "integrity": "sha512-m6xpSdjsNCCGxAkk5ikPFv/sQAfWtieMEXLdeDZE9jnroVozweHpsUhZYhqzTpxVC5SA3jPyTQ6Ods5gRvTBfA==", + "dependencies": { + "@sentry/core": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@sentry/tracing": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.33.0.tgz", + "integrity": "sha512-MtcKyW/QJgXGrHf5+205xnIIl7yIT99MzuTkuKzQwmnmy/siD3U0X8RoCaGLzj6kkSIu4m7vyQZoyd3J+5D8lw==", + "dependencies": { + "@sentry/core": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/types": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.33.0.tgz", + "integrity": "sha512-5kkmYjtBWSbPxfYGiXdZFPS6xpFBNlXvDqeX4NpCFXz6/LiEDn6tZ61kuCSFb8MZlyqyCX5WsP3aiI2FJfpGIA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/utils": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.33.0.tgz", + "integrity": "sha512-msp02GV1gOfaN5FjKjWxI00rtbYLXEE5cTGldhs/Dt9KI63dDk1nwPDkSLhg6joqRItAq0thlBh6un717HdWbg==", + "dependencies": { + "@sentry/types": "7.33.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/webpack-plugin": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@sentry/webpack-plugin/-/webpack-plugin-1.19.0.tgz", + "integrity": "sha512-qSpdgdGMtdzagGveSWgo2b+t8PdPUscuOjbOyWCsJme9jlTFnNk0rX7JEA55OUozikKHM/+vVh08USLBnPboZw==", + "dependencies": { + "@sentry/cli": "^1.74.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/@sentry/cli": { + "version": "1.74.6", + "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-1.74.6.tgz", + "integrity": "sha512-pJ7JJgozyjKZSTjOGi86chIngZMLUlYt2HOog+OJn+WGvqEkVymu8m462j1DiXAnex9NspB4zLLNuZ/R6rTQHg==", + "hasInstallScript": true, + "dependencies": { + "https-proxy-agent": "^5.0.0", + "mkdirp": "^0.5.5", + "node-fetch": "^2.6.7", + "npmlog": "^4.1.2", + "progress": "^2.0.3", + "proxy-from-env": "^1.1.0", + "which": "^2.0.2" + }, + "bin": { + "sentry-cli": "bin/sentry-cli" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "node_modules/@sentry/webpack-plugin/node_modules/are-we-there-yet": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", + "dependencies": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/@sentry/webpack-plugin/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dependencies": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@sentry/webpack-plugin/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", @@ -4119,7 +4446,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, "dependencies": { "debug": "4" }, @@ -4249,6 +4575,11 @@ "node": ">= 8" } }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" + }, "node_modules/arch": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", @@ -4269,6 +4600,18 @@ } ] }, + "node_modules/are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", @@ -5953,7 +6296,6 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -5998,6 +6340,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -6027,6 +6377,14 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "bin": { + "color-support": "bin.js" + } + }, "node_modules/colorette": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", @@ -6230,6 +6588,11 @@ "dev": true, "peer": true }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" + }, "node_modules/constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", @@ -6384,8 +6747,7 @@ "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/create-ecdh": { "version": "4.0.4", @@ -7035,6 +7397,11 @@ "node": ">=0.4.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -7860,7 +8227,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } @@ -9878,6 +10244,24 @@ "node": ">=10" } }, + "node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -10313,6 +10697,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" + }, "node_modules/has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -10514,6 +10903,19 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -10624,7 +11026,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -10690,6 +11091,11 @@ "node": ">= 4" } }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + }, "node_modules/immer": { "version": "9.0.16", "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.16.tgz", @@ -12022,6 +12428,14 @@ "node": ">= 0.8.0" } }, + "node_modules/lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==", + "dependencies": { + "immediate": "~3.0.5" + } + }, "node_modules/lilconfig": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", @@ -12124,6 +12538,14 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/localforage": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz", + "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==", + "dependencies": { + "lie": "3.1.1" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -12267,6 +12689,11 @@ "node": ">=8" } }, + "node_modules/lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==" + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -13768,7 +14195,6 @@ "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -14134,11 +14560,32 @@ "node": ">=8" } }, + "node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -15258,8 +15705,15 @@ "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "engines": { + "node": ">=0.4.0" + } }, "node_modules/promise": { "version": "8.3.0", @@ -15353,8 +15807,7 @@ "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "node_modules/prr": { "version": "1.0.1", @@ -15873,7 +16326,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -16597,8 +17049,7 @@ "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safe-regex": { "version": "1.1.0", @@ -16859,8 +17310,7 @@ "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/slash": { "version": "3.0.0", @@ -17726,7 +18176,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -17735,7 +18184,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -18536,8 +18984,7 @@ "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tree-kill": { "version": "1.2.2", @@ -18639,8 +19086,7 @@ "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -19179,8 +19625,7 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/utils-merge": { "version": "1.0.1", @@ -20228,8 +20673,7 @@ "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/webpack": { "version": "4.46.0", @@ -20797,7 +21241,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -20872,6 +21315,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "node_modules/widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", @@ -20954,7 +21405,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -21129,7 +21579,6 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, "engines": { "node": ">=10" } @@ -21153,7 +21602,6 @@ "version": "17.6.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", - "dev": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -21171,7 +21619,6 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, "engines": { "node": ">=12" } @@ -23376,6 +23823,261 @@ "integrity": "sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==", "dev": true }, + "@sentry/browser": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.33.0.tgz", + "integrity": "sha512-bvExBTyLb7cLWLkHh0gch2W/oSw08Yo8DgEc+KkikOnvWd/xoEWUsYNydYGzV+bL1jqcOErsZy0fVsbzTmh71g==", + "requires": { + "@sentry/core": "7.33.0", + "@sentry/replay": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "tslib": "^1.9.3" + } + }, + "@sentry/cli": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.2.0.tgz", + "integrity": "sha512-ywFtB8VHyWN248LuM67fsRtdMLif/SOHYY3zyef5WybvnAmRLDmGTWK//hSUCebsHBpehRIkmt4iMiyUXwgd5w==", + "requires": { + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.7", + "npmlog": "^6.0.1", + "progress": "^2.0.3", + "proxy-from-env": "^1.1.0", + "which": "^2.0.2" + } + }, + "@sentry/core": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.33.0.tgz", + "integrity": "sha512-mrSgUnXjxHVi0cVea1lv7gC/Y66ya2a3atCHaPEij/+l+3APg5d0Ixt1zMx5YllMiZKf6wpxlZ0uwXcqdAAw+w==", + "requires": { + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "tslib": "^1.9.3" + } + }, + "@sentry/integrations": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.33.0.tgz", + "integrity": "sha512-r67/9R+DaOZETg7gRvOuYPo5XQdzEaE8f7OaET071dUP0kyUBjO74Y7SZxZV/xjBthMXexw5TANHmLVrZQQVag==", + "requires": { + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "localforage": "^1.8.1", + "tslib": "^1.9.3" + } + }, + "@sentry/node": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.33.0.tgz", + "integrity": "sha512-isQVF9LLSG4EZLHiSJ3chgK6f3ZBdGxm8fX6YGm8HWz07CubJddes3yBPLPRNXrRLd7X3SK8pPcK5oc3LIKqAw==", + "requires": { + "@sentry/core": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", + "lru_map": "^0.3.3", + "tslib": "^1.9.3" + } + }, + "@sentry/react": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.33.0.tgz", + "integrity": "sha512-uLgH4Frg6QhST8wj+3F7JvfKPAGkxYl2cessl3KQiYv4lB0x7BpRMQ5PA9X2c6CwiQArNiwy7p+NjrUV6gIcFg==", + "requires": { + "@sentry/browser": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "hoist-non-react-statics": "^3.3.2", + "tslib": "^1.9.3" + } + }, + "@sentry/remix": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/remix/-/remix-7.33.0.tgz", + "integrity": "sha512-Pcr6sssnLIDBelMlb4HJu3J2N94UdRhTGhmELGJvUhvT2GbYVZ9s94/2LdT//j5viRncuvMtfRoOQfJX/Us+3w==", + "requires": { + "@sentry/cli": "2.2.0", + "@sentry/core": "7.33.0", + "@sentry/integrations": "7.33.0", + "@sentry/node": "7.33.0", + "@sentry/react": "7.33.0", + "@sentry/tracing": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "@sentry/webpack-plugin": "1.19.0", + "tslib": "^1.9.3", + "yargs": "^17.6.0" + } + }, + "@sentry/replay": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.33.0.tgz", + "integrity": "sha512-m6xpSdjsNCCGxAkk5ikPFv/sQAfWtieMEXLdeDZE9jnroVozweHpsUhZYhqzTpxVC5SA3jPyTQ6Ods5gRvTBfA==", + "requires": { + "@sentry/core": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0" + } + }, + "@sentry/tracing": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.33.0.tgz", + "integrity": "sha512-MtcKyW/QJgXGrHf5+205xnIIl7yIT99MzuTkuKzQwmnmy/siD3U0X8RoCaGLzj6kkSIu4m7vyQZoyd3J+5D8lw==", + "requires": { + "@sentry/core": "7.33.0", + "@sentry/types": "7.33.0", + "@sentry/utils": "7.33.0", + "tslib": "^1.9.3" + } + }, + "@sentry/types": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.33.0.tgz", + "integrity": "sha512-5kkmYjtBWSbPxfYGiXdZFPS6xpFBNlXvDqeX4NpCFXz6/LiEDn6tZ61kuCSFb8MZlyqyCX5WsP3aiI2FJfpGIA==" + }, + "@sentry/utils": { + "version": "7.33.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.33.0.tgz", + "integrity": "sha512-msp02GV1gOfaN5FjKjWxI00rtbYLXEE5cTGldhs/Dt9KI63dDk1nwPDkSLhg6joqRItAq0thlBh6un717HdWbg==", + "requires": { + "@sentry/types": "7.33.0", + "tslib": "^1.9.3" + } + }, + "@sentry/webpack-plugin": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@sentry/webpack-plugin/-/webpack-plugin-1.19.0.tgz", + "integrity": "sha512-qSpdgdGMtdzagGveSWgo2b+t8PdPUscuOjbOyWCsJme9jlTFnNk0rX7JEA55OUozikKHM/+vVh08USLBnPboZw==", + "requires": { + "@sentry/cli": "^1.74.4" + }, + "dependencies": { + "@sentry/cli": { + "version": "1.74.6", + "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-1.74.6.tgz", + "integrity": "sha512-pJ7JJgozyjKZSTjOGi86chIngZMLUlYt2HOog+OJn+WGvqEkVymu8m462j1DiXAnex9NspB4zLLNuZ/R6rTQHg==", + "requires": { + "https-proxy-agent": "^5.0.0", + "mkdirp": "^0.5.5", + "node-fetch": "^2.6.7", + "npmlog": "^4.1.2", + "progress": "^2.0.3", + "proxy-from-env": "^1.1.0", + "which": "^2.0.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "requires": { + "minimist": "^1.2.6" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, "@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", @@ -24298,7 +25000,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, "requires": { "debug": "4" } @@ -24393,12 +25094,26 @@ "picomatch": "^2.0.4" } }, + "aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" + }, "arch": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true }, + "are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + } + }, "arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", @@ -25657,7 +26372,6 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -25690,6 +26404,11 @@ "mimic-response": "^1.0.0" } }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==" + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -25713,6 +26432,11 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" + }, "colorette": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", @@ -25884,6 +26608,11 @@ "dev": true, "peer": true }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" + }, "constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", @@ -25998,8 +26727,7 @@ "core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "create-ecdh": { "version": "4.0.4", @@ -26505,6 +27233,11 @@ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" + }, "depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -27071,8 +27804,7 @@ "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, "escape-html": { "version": "1.0.3", @@ -28639,6 +29371,21 @@ "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-6.6.2.tgz", "integrity": "sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA==" }, + "gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + } + }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -28969,6 +29716,11 @@ "has-symbols": "^1.0.2" } }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -29131,6 +29883,21 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + } + } + }, "hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -29228,7 +29995,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, "requires": { "agent-base": "6", "debug": "4" @@ -29268,6 +30034,11 @@ "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + }, "immer": { "version": "9.0.16", "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.16.tgz", @@ -30256,6 +31027,14 @@ "type-check": "~0.4.0" } }, + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==", + "requires": { + "immediate": "~3.0.5" + } + }, "lilconfig": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", @@ -30328,6 +31107,14 @@ "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==", "dev": true }, + "localforage": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz", + "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==", + "requires": { + "lie": "3.1.1" + } + }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -30436,6 +31223,11 @@ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true }, + "lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==" + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -31522,7 +32314,6 @@ "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, "requires": { "whatwg-url": "^5.0.0" } @@ -31824,11 +32615,26 @@ "path-key": "^3.0.0" } }, + "npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "requires": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==" + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-copy": { "version": "0.1.0", @@ -32642,8 +33448,12 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "promise": { "version": "8.3.0", @@ -32731,8 +33541,7 @@ "proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "prr": { "version": "1.0.1", @@ -33132,7 +33941,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -33685,8 +34493,7 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-regex": { "version": "1.1.0", @@ -33909,8 +34716,7 @@ "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "slash": { "version": "3.0.0", @@ -34633,7 +35439,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "requires": { "safe-buffer": "~5.2.0" }, @@ -34641,8 +35446,7 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" } } }, @@ -35293,8 +36097,7 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "tree-kill": { "version": "1.2.2", @@ -35363,8 +36166,7 @@ "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "tsutils": { "version": "3.21.0", @@ -35768,8 +36570,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "utils-merge": { "version": "1.0.1", @@ -36471,8 +37272,7 @@ "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "webpack": { "version": "4.46.0", @@ -36943,7 +37743,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -37000,6 +37799,14 @@ "is-typed-array": "^1.1.10" } }, + "wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "requires": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", @@ -37057,7 +37864,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -37187,8 +37993,7 @@ "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, "yallist": { "version": "4.0.0", @@ -37206,7 +38011,6 @@ "version": "17.6.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", - "dev": true, "requires": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -37220,8 +38024,7 @@ "yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" }, "yauzl": { "version": "2.10.0", diff --git a/package.json b/package.json index 24d89f6..e6062fc 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "@remix-run/node": "^1.7.6", "@remix-run/react": "^1.7.6", "@remix-validated-form/with-zod": "^2.0.5", + "@sentry/remix": "^7.33.0", "cross-env": "^7.0.3", "debounce": "^1.2.1", "dotenv-cli": "^6.0.0", @@ -61,8 +62,8 @@ "@testing-library/cypress": "^8.0.7", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", - "@types/node": "^18.11.18", "@types/debounce": "^1.2.1", + "@types/node": "^18.11.18", "@types/qrcode": "^1.5.0", "@types/react": "^18.0.25", "@types/react-dom": "^18.0.8", From 520b9fcb56a6ad3842c9aac365c93996e85a2317 Mon Sep 17 00:00:00 2001 From: Keith Stolte Date: Wed, 25 Jan 2023 20:36:50 -0500 Subject: [PATCH 13/44] fix(songs): restricting the fetching of songs to just the ones that the user created for now Not sure if this is what we were thinking of for the MVP or if it was going to be a free for all and users could use eachothers songs. --- app/db/song.db.ts | 9 +++++++-- app/routes/__app/songs/$id/index.tsx | 2 +- app/routes/__app/songs/index.tsx | 5 ++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/db/song.db.ts b/app/db/song.db.ts index 1df5ec5..d27be8a 100644 --- a/app/db/song.db.ts +++ b/app/db/song.db.ts @@ -24,8 +24,13 @@ export async function getSong({ id }: Pick) { }); } -export async function getSongs() { - return await prisma.song.findMany(); +/** + * Gets the songs of the currently logged in user + * @param userId + * @returns + */ +export async function getUserSongs(userId: number) { + return await prisma.song.findMany({ where: { authorId: userId } }); } export async function createSong({ authorId }: Pick) { diff --git a/app/routes/__app/songs/$id/index.tsx b/app/routes/__app/songs/$id/index.tsx index f6e02ae..3b8885a 100644 --- a/app/routes/__app/songs/$id/index.tsx +++ b/app/routes/__app/songs/$id/index.tsx @@ -19,7 +19,7 @@ export async function loader({ params }: LoaderArgs) { export default function () { const { song } = useTypedLoaderData(); - console.log(song.stanzas); + return (
diff --git a/app/routes/__app/songs/index.tsx b/app/routes/__app/songs/index.tsx index ecf2cd5..d09ef3b 100644 --- a/app/routes/__app/songs/index.tsx +++ b/app/routes/__app/songs/index.tsx @@ -5,14 +5,13 @@ import { Form, Link } from "@remix-run/react"; import { typedjson, useTypedLoaderData } from "remix-typedjson"; import { Button } from "~/components/Button"; import { Search } from "~/components/Search"; -import { getSongs } from "~/db/song.db"; +import { getUserSongs } from "~/db/song.db"; import { useSearch } from "~/lib/useSearch"; import { requireAuthentication } from "~/utils/auth.server"; export async function loader({ request }: LoaderArgs) { const user = await requireAuthentication(request); - console.log(user); - return typedjson({ songs: await getSongs() }); + return typedjson({ songs: await getUserSongs(user.id) }); } export default function SongsIndex() { From 9e7e013316b3525858d73c388041cd72f99d8a54 Mon Sep 17 00:00:00 2001 From: Keith Stolte Date: Thu, 26 Jan 2023 13:00:32 -0500 Subject: [PATCH 14/44] review: renaming function for getting songs by userid --- app/db/song.db.ts | 4 ++-- app/routes/__app/songs/index.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/db/song.db.ts b/app/db/song.db.ts index d27be8a..5c4a53b 100644 --- a/app/db/song.db.ts +++ b/app/db/song.db.ts @@ -25,11 +25,11 @@ export async function getSong({ id }: Pick) { } /** - * Gets the songs of the currently logged in user + * Gets the songs of the specified userid * @param userId * @returns */ -export async function getUserSongs(userId: number) { +export async function getSongsByUserId(userId: number) { return await prisma.song.findMany({ where: { authorId: userId } }); } diff --git a/app/routes/__app/songs/index.tsx b/app/routes/__app/songs/index.tsx index d09ef3b..123a6c3 100644 --- a/app/routes/__app/songs/index.tsx +++ b/app/routes/__app/songs/index.tsx @@ -5,13 +5,13 @@ import { Form, Link } from "@remix-run/react"; import { typedjson, useTypedLoaderData } from "remix-typedjson"; import { Button } from "~/components/Button"; import { Search } from "~/components/Search"; -import { getUserSongs } from "~/db/song.db"; +import { getSongsByUserId } from "~/db/song.db"; import { useSearch } from "~/lib/useSearch"; import { requireAuthentication } from "~/utils/auth.server"; export async function loader({ request }: LoaderArgs) { const user = await requireAuthentication(request); - return typedjson({ songs: await getUserSongs(user.id) }); + return typedjson({ songs: await getSongsByUserId(user.id) }); } export default function SongsIndex() { From e45b12484ddcb4071617725acff30a211540fdb3 Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Fri, 27 Jan 2023 19:27:27 -0500 Subject: [PATCH 15/44] Delete unsused lineToMark helper --- app/helpers/lineToMarkFieldArrayItems.test.ts | 31 ------------------- app/helpers/lineToMarkFieldArrayItems.ts | 15 --------- 2 files changed, 46 deletions(-) delete mode 100644 app/helpers/lineToMarkFieldArrayItems.test.ts delete mode 100644 app/helpers/lineToMarkFieldArrayItems.ts diff --git a/app/helpers/lineToMarkFieldArrayItems.test.ts b/app/helpers/lineToMarkFieldArrayItems.test.ts deleted file mode 100644 index 76169ed..0000000 --- a/app/helpers/lineToMarkFieldArrayItems.test.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { createMockSong } from "@/test/factories/song.factory"; -import { lineToMarkFieldArrayItems } from "./lineToMarkFieldArrayItems"; - -const defaultSong = createMockSong(); - -describe("Array length", () => { - test("should convert line to an array of 1 greater than length of lyrics", () => { - const testLine = defaultSong.stanzas[0].lines[2]; - testLine.lyrics = new Array(55).fill("a").join(""); - const fieldArrayItems = lineToMarkFieldArrayItems(testLine); - - expect(fieldArrayItems.length).toBe(testLine.lyrics.length + 1); - }); - - test("should convert empty line to an array of 50 null characters", () => { - const testLine = defaultSong.stanzas[0].lines[0]; - testLine.lyrics = ""; - const fieldArrayItems = lineToMarkFieldArrayItems(testLine); - - expect(fieldArrayItems.length).toBe(50); - }); -}); - -test("should insert markings in the array at the index of their indent value", () => { - const testLine1 = defaultSong.stanzas[0].lines[0]; - const fieldArrayItems = lineToMarkFieldArrayItems(testLine1); - - testLine1.markings.forEach((marking) => { - expect(fieldArrayItems[marking.indent]).toMatchObject(marking); - }); -}); diff --git a/app/helpers/lineToMarkFieldArrayItems.ts b/app/helpers/lineToMarkFieldArrayItems.ts deleted file mode 100644 index 2c24885..0000000 --- a/app/helpers/lineToMarkFieldArrayItems.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { ILine, IMarking } from "@/types/song"; - -export function lineToMarkFieldArrayItems( - line: ILine -): (IMarking | undefined)[] { - const lyricCharactersCount = line.lyrics.length; - const arrayItems = new Array(Math.max(lyricCharactersCount + 1, 50)).fill( - undefined - ); - const markings = line.markings || []; - markings.forEach((marking) => { - arrayItems[marking.indent] = marking; - }); - return arrayItems; -} From 4b04bbc892a5cac3c967f2514cdbbf56b11dacbb Mon Sep 17 00:00:00 2001 From: Drew Lytle Date: Fri, 27 Jan 2023 19:27:47 -0500 Subject: [PATCH 16/44] Update test files --- app/components/Dialog/Dialog.test.tsx | 2 +- app/components/Dialog/Dialog.tsx | 7 +- .../MarkingInput/MarkingInput.test.tsx | 3 +- app/components/MarkingInput/MarkingInput.tsx | 1 + app/components/NavBar/NavBar.test.tsx | 2 +- app/components/Search/Search.test.tsx | 2 +- app/components/Search/Search.tsx | 5 +- app/components/Select/Select.test.tsx | 7 +- app/components/Stanza/Stanza.test.tsx | 3 +- app/components/Stanza/Stanza.tsx | 2 +- .../forms/setlist/SetlistForm.test.tsx | 4 +- app/styles/tailwind.css | 209 ++++++++++-------- 12 files changed, 147 insertions(+), 100 deletions(-) diff --git a/app/components/Dialog/Dialog.test.tsx b/app/components/Dialog/Dialog.test.tsx index dcb2064..c389754 100644 --- a/app/components/Dialog/Dialog.test.tsx +++ b/app/components/Dialog/Dialog.test.tsx @@ -2,7 +2,7 @@ import { render, screen } from "@testing-library/react"; import { Dialog } from "./Dialog"; test("Should render", () => { - render(); + render( {}} title="My Modal" isOpen={true} />); expect(screen.getByTestId("dialog")).toBeInTheDocument(); }); diff --git a/app/components/Dialog/Dialog.tsx b/app/components/Dialog/Dialog.tsx index aed8ebe..98b0547 100644 --- a/app/components/Dialog/Dialog.tsx +++ b/app/components/Dialog/Dialog.tsx @@ -18,7 +18,12 @@ export const Dialog: React.FC> = ({ onClose, }) => { return ( - +
diff --git a/app/components/MarkingInput/MarkingInput.test.tsx b/app/components/MarkingInput/MarkingInput.test.tsx index 1348e49..fbd7e77 100644 --- a/app/components/MarkingInput/MarkingInput.test.tsx +++ b/app/components/MarkingInput/MarkingInput.test.tsx @@ -1,8 +1,9 @@ +import { createMockMarking } from "@/test/factories/song.factory"; import { render, screen } from "@testing-library/react"; import { MarkingInput } from "./MarkingInput"; test("Should render", () => { - render(); + render(); expect(screen.getByTestId("markinginput")).toBeInTheDocument(); }); diff --git a/app/components/MarkingInput/MarkingInput.tsx b/app/components/MarkingInput/MarkingInput.tsx index 12e0cdd..d19bbd2 100644 --- a/app/components/MarkingInput/MarkingInput.tsx +++ b/app/components/MarkingInput/MarkingInput.tsx @@ -47,6 +47,7 @@ export const MarkingInput: React.FC = ({ marking, deleteMark }) => { style={{ left: `${indent}ch`, }} + data-testid="markinginput" >
{title} {description && (
-

{description}

+

{description}

)} diff --git a/app/components/Input/Input.tsx b/app/components/Input/Input.tsx index 013c10c..699c51e 100644 --- a/app/components/Input/Input.tsx +++ b/app/components/Input/Input.tsx @@ -8,7 +8,7 @@ export const Input: React.FC> = data-testid="input" className={[ !props.hidden && "block", - "w-full bg-inherit focus:outline-none placeholder-stone-400", + "w-full bg-inherit focus:outline-none placeholder-neutral-400", className, ].join(" ")} {...props} diff --git a/app/components/MarkingInput/MarkingInput.tsx b/app/components/MarkingInput/MarkingInput.tsx index d19bbd2..db16b03 100644 --- a/app/components/MarkingInput/MarkingInput.tsx +++ b/app/components/MarkingInput/MarkingInput.tsx @@ -67,7 +67,7 @@ export const MarkingInput: React.FC = ({ marking, deleteMark }) => { style={{ width: `${mark.length || 1}ch`, }} - className="font-mono rounded-sm !bg-stone-200 w-auto" + className="font-mono rounded-sm !bg-neutral-200 w-auto" /> + ); }; diff --git a/app/components/forms/setlist/SetlistForm.tsx b/app/components/forms/setlist/SetlistForm.tsx index d917572..782315c 100644 --- a/app/components/forms/setlist/SetlistForm.tsx +++ b/app/components/forms/setlist/SetlistForm.tsx @@ -19,7 +19,7 @@ const SetlistForm = forwardRef< className="space-y-3" >
-
-