chore(deps): Update dependencies and enhance API error handling

- Added '@vercel/analytics' to package.json for improved analytics tracking.
- Updated 'next' version from 15.0.2 to 15.0.3 to incorporate the latest features and fixes.
- Refactored API routes for invitations and studies to improve error handling and response structure.
- Enhanced permission checks in the invitations and studies API to ensure proper access control.
- Removed the participants dashboard page as part of a restructuring effort.
- Updated the database schema to include environment settings for users and studies.
- Improved the dashboard components to handle loading states and display statistics more effectively.
This commit is contained in:
2024-12-04 12:32:54 -05:00
parent cb4c0f9c87
commit 95b106d9e9
22 changed files with 1160 additions and 771 deletions

134
pnpm-lock.yaml generated
View File

@@ -10,7 +10,7 @@ importers:
dependencies:
'@clerk/nextjs':
specifier: ^6.4.0
version: 6.4.0(next@15.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
version: 6.4.0(next@15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@radix-ui/react-alert-dialog':
specifier: ^1.1.2
version: 1.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
@@ -35,6 +35,9 @@ importers:
'@types/nodemailer':
specifier: ^6.4.17
version: 6.4.17
'@vercel/analytics':
specifier: ^1.4.1
version: 1.4.1(next@15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
'@vercel/postgres':
specifier: ^0.10.0
version: 0.10.0
@@ -57,8 +60,8 @@ importers:
specifier: ^0.454.0
version: 0.454.0(react@18.3.1)
next:
specifier: 15.0.2
version: 15.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
specifier: 15.0.3
version: 15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
ngrok:
specifier: 5.0.0-beta.2
version: 5.0.0-beta.2
@@ -780,56 +783,56 @@ packages:
'@neondatabase/serverless@0.9.5':
resolution: {integrity: sha512-siFas6gItqv6wD/pZnvdu34wEqgG3nSE6zWZdq5j2DEsa+VvX8i/5HXJOo06qrw5axPXn+lGCxeR+NLaSPIXug==}
'@next/env@15.0.2':
resolution: {integrity: sha512-c0Zr0ModK5OX7D4ZV8Jt/wqoXtitLNPwUfG9zElCZztdaZyNVnN40rDXVZ/+FGuR4CcNV5AEfM6N8f+Ener7Dg==}
'@next/env@15.0.3':
resolution: {integrity: sha512-t9Xy32pjNOvVn2AS+Utt6VmyrshbpfUMhIjFO60gI58deSo/KgLOp31XZ4O+kY/Is8WAGYwA5gR7kOb1eORDBA==}
'@next/eslint-plugin-next@15.0.2':
resolution: {integrity: sha512-R9Jc7T6Ge0txjmqpPwqD8vx6onQjynO9JT73ArCYiYPvSrwYXepH/UY/WdKDY8JPWJl72sAE4iGMHPeQ5xdEWg==}
'@next/swc-darwin-arm64@15.0.2':
resolution: {integrity: sha512-GK+8w88z+AFlmt+ondytZo2xpwlfAR8U6CRwXancHImh6EdGfHMIrTSCcx5sOSBei00GyLVL0ioo1JLKTfprgg==}
'@next/swc-darwin-arm64@15.0.3':
resolution: {integrity: sha512-s3Q/NOorCsLYdCKvQlWU+a+GeAd3C8Rb3L1YnetsgwXzhc3UTWrtQpB/3eCjFOdGUj5QmXfRak12uocd1ZiiQw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
'@next/swc-darwin-x64@15.0.2':
resolution: {integrity: sha512-KUpBVxIbjzFiUZhiLIpJiBoelqzQtVZbdNNsehhUn36e2YzKHphnK8eTUW1s/4aPy5kH/UTid8IuVbaOpedhpw==}
'@next/swc-darwin-x64@15.0.3':
resolution: {integrity: sha512-Zxl/TwyXVZPCFSf0u2BNj5sE0F2uR6iSKxWpq4Wlk/Sv9Ob6YCKByQTkV2y6BCic+fkabp9190hyrDdPA/dNrw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
'@next/swc-linux-arm64-gnu@15.0.2':
resolution: {integrity: sha512-9J7TPEcHNAZvwxXRzOtiUvwtTD+fmuY0l7RErf8Yyc7kMpE47MIQakl+3jecmkhOoIyi/Rp+ddq7j4wG6JDskQ==}
'@next/swc-linux-arm64-gnu@15.0.3':
resolution: {integrity: sha512-T5+gg2EwpsY3OoaLxUIofmMb7ohAUlcNZW0fPQ6YAutaWJaxt1Z1h+8zdl4FRIOr5ABAAhXtBcpkZNwUcKI2fw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
'@next/swc-linux-arm64-musl@15.0.2':
resolution: {integrity: sha512-BjH4ZSzJIoTTZRh6rG+a/Ry4SW0HlizcPorqNBixBWc3wtQtj4Sn9FnRZe22QqrPnzoaW0ctvSz4FaH4eGKMww==}
'@next/swc-linux-arm64-musl@15.0.3':
resolution: {integrity: sha512-WkAk6R60mwDjH4lG/JBpb2xHl2/0Vj0ZRu1TIzWuOYfQ9tt9NFsIinI1Epma77JVgy81F32X/AeD+B2cBu/YQA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
'@next/swc-linux-x64-gnu@15.0.2':
resolution: {integrity: sha512-i3U2TcHgo26sIhcwX/Rshz6avM6nizrZPvrDVDY1bXcLH1ndjbO8zuC7RoHp0NSK7wjJMPYzm7NYL1ksSKFreA==}
'@next/swc-linux-x64-gnu@15.0.3':
resolution: {integrity: sha512-gWL/Cta1aPVqIGgDb6nxkqy06DkwJ9gAnKORdHWX1QBbSZZB+biFYPFti8aKIQL7otCE1pjyPaXpFzGeG2OS2w==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
'@next/swc-linux-x64-musl@15.0.2':
resolution: {integrity: sha512-AMfZfSVOIR8fa+TXlAooByEF4OB00wqnms1sJ1v+iu8ivwvtPvnkwdzzFMpsK5jA2S9oNeeQ04egIWVb4QWmtQ==}
'@next/swc-linux-x64-musl@15.0.3':
resolution: {integrity: sha512-QQEMwFd8r7C0GxQS62Zcdy6GKx999I/rTO2ubdXEe+MlZk9ZiinsrjwoiBL5/57tfyjikgh6GOU2WRQVUej3UA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
'@next/swc-win32-arm64-msvc@15.0.2':
resolution: {integrity: sha512-JkXysDT0/hEY47O+Hvs8PbZAeiCQVxKfGtr4GUpNAhlG2E0Mkjibuo8ryGD29Qb5a3IOnKYNoZlh/MyKd2Nbww==}
'@next/swc-win32-arm64-msvc@15.0.3':
resolution: {integrity: sha512-9TEp47AAd/ms9fPNgtgnT7F3M1Hf7koIYYWCMQ9neOwjbVWJsHZxrFbI3iEDJ8rf1TDGpmHbKxXf2IFpAvheIQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
'@next/swc-win32-x64-msvc@15.0.2':
resolution: {integrity: sha512-foaUL0NqJY/dX0Pi/UcZm5zsmSk5MtP/gxx3xOPyREkMFN+CTjctPfu3QaqrQHinaKdPnMWPJDKt4VjDfTBe/Q==}
'@next/swc-win32-x64-msvc@15.0.3':
resolution: {integrity: sha512-VNAz+HN4OGgvZs6MOoVfnn41kBzT+M+tB+OK4cww6DNyWS6wKaDpaAm/qLeOUbnMh0oVx1+mg0uoYARF69dJyA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
@@ -1316,6 +1319,32 @@ packages:
resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@vercel/analytics@1.4.1':
resolution: {integrity: sha512-ekpL4ReX2TH3LnrRZTUKjHHNpNy9S1I7QmS+g/RQXoSUQ8ienzosuX7T9djZ/s8zPhBx1mpHP/Rw5875N+zQIQ==}
peerDependencies:
'@remix-run/react': ^2
'@sveltejs/kit': ^1 || ^2
next: '>= 13'
react: ^18 || ^19 || ^19.0.0-rc
svelte: '>= 4'
vue: ^3
vue-router: ^4
peerDependenciesMeta:
'@remix-run/react':
optional: true
'@sveltejs/kit':
optional: true
next:
optional: true
react:
optional: true
svelte:
optional: true
vue:
optional: true
vue-router:
optional: true
'@vercel/postgres@0.10.0':
resolution: {integrity: sha512-fSD23DxGND40IzSkXjcFcxr53t3Tiym59Is0jSYIFpG4/0f0KO9SGtcp1sXiebvPaGe7N/tU05cH4yt2S6/IPg==}
engines: {node: '>=18.14'}
@@ -2352,16 +2381,16 @@ packages:
natural-compare@1.4.0:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
next@15.0.2:
resolution: {integrity: sha512-rxIWHcAu4gGSDmwsELXacqAPUk+j8dV/A9cDF5fsiCMpkBDYkO2AEaL1dfD+nNmDiU6QMCFN8Q30VEKapT9UHQ==}
engines: {node: '>=18.18.0'}
next@15.0.3:
resolution: {integrity: sha512-ontCbCRKJUIoivAdGB34yCaOcPgYXr9AAkV/IwqFfWWTXEPUgLYkSkqBhIk9KK7gGmgjc64B+RdoeIDM13Irnw==}
engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
hasBin: true
peerDependencies:
'@opentelemetry/api': ^1.1.0
'@playwright/test': ^1.41.2
babel-plugin-react-compiler: '*'
react: ^18.2.0 || 19.0.0-rc-02c0e824-20241028
react-dom: ^18.2.0 || 19.0.0-rc-02c0e824-20241028
react: ^18.2.0 || 19.0.0-rc-66855b96-20241106
react-dom: ^18.2.0 || 19.0.0-rc-66855b96-20241106
sass: ^1.3.0
peerDependenciesMeta:
'@opentelemetry/api':
@@ -3079,15 +3108,15 @@ snapshots:
react-dom: 18.3.1(react@18.3.1)
tslib: 2.4.1
'@clerk/nextjs@6.4.0(next@15.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
'@clerk/nextjs@6.4.0(next@15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
dependencies:
'@clerk/backend': 1.17.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@clerk/clerk-react': 5.16.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@clerk/shared': 2.15.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@clerk/types': 4.34.0
crypto-js: 4.2.0
ezheaders: 0.1.0(next@15.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
next: 15.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
ezheaders: 0.1.0(next@15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
next: 15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
server-only: 0.0.1
@@ -3507,34 +3536,34 @@ snapshots:
dependencies:
'@types/pg': 8.11.6
'@next/env@15.0.2': {}
'@next/env@15.0.3': {}
'@next/eslint-plugin-next@15.0.2':
dependencies:
fast-glob: 3.3.1
'@next/swc-darwin-arm64@15.0.2':
'@next/swc-darwin-arm64@15.0.3':
optional: true
'@next/swc-darwin-x64@15.0.2':
'@next/swc-darwin-x64@15.0.3':
optional: true
'@next/swc-linux-arm64-gnu@15.0.2':
'@next/swc-linux-arm64-gnu@15.0.3':
optional: true
'@next/swc-linux-arm64-musl@15.0.2':
'@next/swc-linux-arm64-musl@15.0.3':
optional: true
'@next/swc-linux-x64-gnu@15.0.2':
'@next/swc-linux-x64-gnu@15.0.3':
optional: true
'@next/swc-linux-x64-musl@15.0.2':
'@next/swc-linux-x64-musl@15.0.3':
optional: true
'@next/swc-win32-arm64-msvc@15.0.2':
'@next/swc-win32-arm64-msvc@15.0.3':
optional: true
'@next/swc-win32-x64-msvc@15.0.2':
'@next/swc-win32-x64-msvc@15.0.3':
optional: true
'@nodelib/fs.scandir@2.1.5':
@@ -4015,6 +4044,11 @@ snapshots:
'@typescript-eslint/types': 8.15.0
eslint-visitor-keys: 4.2.0
'@vercel/analytics@1.4.1(next@15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)':
optionalDependencies:
next: 15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react: 18.3.1
'@vercel/postgres@0.10.0':
dependencies:
'@neondatabase/serverless': 0.9.5
@@ -4758,9 +4792,9 @@ snapshots:
transitivePeerDependencies:
- supports-color
ezheaders@0.1.0(next@15.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
ezheaders@0.1.0(next@15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
dependencies:
next: 15.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
next: 15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
fast-deep-equal@3.1.3: {}
@@ -5188,9 +5222,9 @@ snapshots:
natural-compare@1.4.0: {}
next@15.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
next@15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
'@next/env': 15.0.2
'@next/env': 15.0.3
'@swc/counter': 0.1.3
'@swc/helpers': 0.5.13
busboy: 1.6.0
@@ -5200,14 +5234,14 @@ snapshots:
react-dom: 18.3.1(react@18.3.1)
styled-jsx: 5.1.6(react@18.3.1)
optionalDependencies:
'@next/swc-darwin-arm64': 15.0.2
'@next/swc-darwin-x64': 15.0.2
'@next/swc-linux-arm64-gnu': 15.0.2
'@next/swc-linux-arm64-musl': 15.0.2
'@next/swc-linux-x64-gnu': 15.0.2
'@next/swc-linux-x64-musl': 15.0.2
'@next/swc-win32-arm64-msvc': 15.0.2
'@next/swc-win32-x64-msvc': 15.0.2
'@next/swc-darwin-arm64': 15.0.3
'@next/swc-darwin-x64': 15.0.3
'@next/swc-linux-arm64-gnu': 15.0.3
'@next/swc-linux-arm64-musl': 15.0.3
'@next/swc-linux-x64-gnu': 15.0.3
'@next/swc-linux-x64-musl': 15.0.3
'@next/swc-win32-arm64-msvc': 15.0.3
'@next/swc-win32-x64-msvc': 15.0.3
sharp: 0.33.5
transitivePeerDependencies:
- '@babel/core'