diff --git a/package.json b/package.json index e508f1c..2d05126 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "dependencies": { "@ably-labs/react-hooks": "^2.1.1", "@clerk/nextjs": "^4.23.2", - "@neondatabase/serverless": "^0.5.7", + "@neondatabase/serverless": "^0.6.0", "@paralleldrive/cuid2": "^2.2.2", "@react-email/components": "^0.0.7", "@tanstack/react-query": "^4.32.6", @@ -31,7 +31,7 @@ "dotenv": "^16.3.1", "drizzle-orm": "^0.28.2", "json2csv": "6.0.0-alpha.2", - "next": "^13.4.16", + "next": "^13.4.19", "nextjs-cors": "^2.1.2", "postcss": "^8.4.28", "react": "18.2.0", @@ -41,19 +41,19 @@ "resend": "^1.0.0", "sharp": "^0.32.5", "superjson": "1.13.1", - "zod": "^3.22.1" + "zod": "^3.22.2" }, "devDependencies": { "@types/eslint": "^8.44.2", "@types/json2csv": "^5.0.3", - "@types/node": "^20.5.0", + "@types/node": "^20.5.1", "@types/react": "^18.2.20", "@typescript-eslint/eslint-plugin": "^6.4.0", "@typescript-eslint/parser": "^6.4.0", "daisyui": "^3.5.1", - "drizzle-kit": "^0.19.12", + "drizzle-kit": "^0.19.13", "eslint": "^8.47.0", - "eslint-config-next": "^13.4.16", + "eslint-config-next": "^13.4.19", "pg": "^8.11.3", "tailwindcss": "^3.3.3", "typescript": "^5.1.6" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f5074e8..373c752 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,10 +10,10 @@ dependencies: version: 2.1.1(react-dom@18.2.0)(react@18.2.0) '@clerk/nextjs': specifier: ^4.23.2 - version: 4.23.2(next@13.4.16)(react-dom@18.2.0)(react@18.2.0) + version: 4.23.2(next@13.4.19)(react-dom@18.2.0)(react@18.2.0) '@neondatabase/serverless': - specifier: ^0.5.7 - version: 0.5.7 + specifier: ^0.6.0 + version: 0.6.0 '@paralleldrive/cuid2': specifier: ^2.2.2 version: 2.2.2 @@ -28,7 +28,7 @@ dependencies: version: 10.37.1(@trpc/server@10.37.1) '@trpc/next': specifier: 10.37.1 - version: 10.37.1(@tanstack/react-query@4.32.6)(@trpc/client@10.37.1)(@trpc/react-query@10.37.1)(@trpc/server@10.37.1)(next@13.4.16)(react-dom@18.2.0)(react@18.2.0) + version: 10.37.1(@tanstack/react-query@4.32.6)(@trpc/client@10.37.1)(@trpc/react-query@10.37.1)(@trpc/server@10.37.1)(next@13.4.19)(react-dom@18.2.0)(react@18.2.0) '@trpc/react-query': specifier: 10.37.1 version: 10.37.1(@tanstack/react-query@4.32.6)(@trpc/client@10.37.1)(@trpc/server@10.37.1)(react-dom@18.2.0)(react@18.2.0) @@ -55,16 +55,16 @@ dependencies: version: 16.3.1 drizzle-orm: specifier: ^0.28.2 - version: 0.28.2(@neondatabase/serverless@0.5.7)(pg@8.11.3) + version: 0.28.2(@neondatabase/serverless@0.6.0)(pg@8.11.3) json2csv: specifier: 6.0.0-alpha.2 version: 6.0.0-alpha.2 next: - specifier: ^13.4.16 - version: 13.4.16(react-dom@18.2.0)(react@18.2.0) + specifier: ^13.4.19 + version: 13.4.19(react-dom@18.2.0)(react@18.2.0) nextjs-cors: specifier: ^2.1.2 - version: 2.1.2(next@13.4.16) + version: 2.1.2(next@13.4.19) postcss: specifier: ^8.4.28 version: 8.4.28 @@ -90,8 +90,8 @@ dependencies: specifier: 1.13.1 version: 1.13.1 zod: - specifier: ^3.22.1 - version: 3.22.1 + specifier: ^3.22.2 + version: 3.22.2 devDependencies: '@types/eslint': @@ -101,8 +101,8 @@ devDependencies: specifier: ^5.0.3 version: 5.0.3 '@types/node': - specifier: ^20.5.0 - version: 20.5.0 + specifier: ^20.5.1 + version: 20.5.1 '@types/react': specifier: ^18.2.20 version: 18.2.20 @@ -116,14 +116,14 @@ devDependencies: specifier: ^3.5.1 version: 3.5.1 drizzle-kit: - specifier: ^0.19.12 - version: 0.19.12 + specifier: ^0.19.13 + version: 0.19.13 eslint: specifier: ^8.47.0 version: 8.47.0 eslint-config-next: - specifier: ^13.4.16 - version: 13.4.16(eslint@8.47.0)(typescript@5.1.6) + specifier: ^13.4.19 + version: 13.4.19(eslint@8.47.0)(typescript@5.1.6) pg: specifier: ^8.11.3 version: 8.11.3 @@ -234,7 +234,7 @@ packages: tslib: 2.4.1 dev: false - /@clerk/nextjs@4.23.2(next@13.4.16)(react-dom@18.2.0)(react@18.2.0): + /@clerk/nextjs@4.23.2(next@13.4.19)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-99bSVu9r1E9MxybO/6mmPAufSKq4KU7SFeMVkylX7UF8sy5t/LE9cLHyc+9jitcCGgZNai9Om4sj1WIgkNOP8w==} engines: {node: '>=14'} peerDependencies: @@ -246,7 +246,7 @@ packages: '@clerk/clerk-react': 4.23.2(react@18.2.0) '@clerk/clerk-sdk-node': 4.12.2 '@clerk/types': 3.49.0 - next: 13.4.16(react-dom@18.2.0)(react@18.2.0) + next: 13.4.19(react-dom@18.2.0)(react@18.2.0) path-to-regexp: 6.2.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -998,24 +998,24 @@ packages: read-yaml-file: 1.1.0 dev: false - /@neondatabase/serverless@0.5.7: - resolution: {integrity: sha512-pIcgFWueCn5WQvtwHxji1EBpo1iGnlnPs/K02qmy7P150oHiohvgH5C4gWMTW52fqiMpPvK9kAdV9D07oJsd7w==} + /@neondatabase/serverless@0.6.0: + resolution: {integrity: sha512-qXxBRYN0m2v8kVQBfMxbzNGn2xFAhTXFibzQlE++NfJ56Shz3m7+MyBBtXDlEH+3Wfa6lToDXf1MElocY4sJ3w==} dependencies: '@types/pg': 8.6.6 dev: false - /@next/env@13.4.16: - resolution: {integrity: sha512-pCU0sJBqdfKP9mwDadxvZd+eLz3fZrTlmmDHY12Hdpl3DD0vy8ou5HWKVfG0zZS6tqhL4wnQqRbspdY5nqa7MA==} + /@next/env@13.4.19: + resolution: {integrity: sha512-FsAT5x0jF2kkhNkKkukhsyYOrRqtSxrEhfliniIq0bwWbuXLgyt3Gv0Ml+b91XwjwArmuP7NxCiGd++GGKdNMQ==} dev: false - /@next/eslint-plugin-next@13.4.16: - resolution: {integrity: sha512-QuFtQl+oSEEQb0HMYBdvBoUaTiMxbY3go/MFkF3zOnfY0t84+IbAX78cw8ZCfr6cA6UcTq3nMIlCrHwDC/moxg==} + /@next/eslint-plugin-next@13.4.19: + resolution: {integrity: sha512-N/O+zGb6wZQdwu6atMZHbR7T9Np5SUFUjZqCbj0sXm+MwQO35M8TazVB4otm87GkXYs2l6OPwARd3/PUWhZBVQ==} dependencies: glob: 7.1.7 dev: true - /@next/swc-darwin-arm64@13.4.16: - resolution: {integrity: sha512-Rl6i1uUq0ciRa3VfEpw6GnWAJTSKo9oM2OrkGXPsm7rMxdd2FR5NkKc0C9xzFCI4+QtmBviWBdF2m3ur3Nqstw==} + /@next/swc-darwin-arm64@13.4.19: + resolution: {integrity: sha512-vv1qrjXeGbuF2mOkhkdxMDtv9np7W4mcBtaDnHU+yJG+bBwa6rYsYSCI/9Xm5+TuF5SbZbrWO6G1NfTh1TMjvQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1023,8 +1023,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64@13.4.16: - resolution: {integrity: sha512-o1vIKYbZORyDmTrPV1hApt9NLyWrS5vr2p5hhLGpOnkBY1cz6DAXjv8Lgan8t6X87+83F0EUDlu7klN8ieZ06A==} + /@next/swc-darwin-x64@13.4.19: + resolution: {integrity: sha512-jyzO6wwYhx6F+7gD8ddZfuqO4TtpJdw3wyOduR4fxTUCm3aLw7YmHGYNjS0xRSYGAkLpBkH1E0RcelyId6lNsw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1032,8 +1032,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu@13.4.16: - resolution: {integrity: sha512-JRyAl8lCfyTng4zoOmE6hNI2f1MFUr7JyTYCHl1RxX42H4a5LMwJhDVQ7a9tmDZ/yj+0hpBn+Aan+d6lA3v0UQ==} + /@next/swc-linux-arm64-gnu@13.4.19: + resolution: {integrity: sha512-vdlnIlaAEh6H+G6HrKZB9c2zJKnpPVKnA6LBwjwT2BTjxI7e0Hx30+FoWCgi50e+YO49p6oPOtesP9mXDRiiUg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1041,8 +1041,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl@13.4.16: - resolution: {integrity: sha512-9gqVqNzUMWbUDgDiND18xoUqhwSm2gmksqXgCU0qaOKt6oAjWz8cWYjgpPVD0WICKFylEY/gvPEP1fMZDVFZ/g==} + /@next/swc-linux-arm64-musl@13.4.19: + resolution: {integrity: sha512-aU0HkH2XPgxqrbNRBFb3si9Ahu/CpaR5RPmN2s9GiM9qJCiBBlZtRTiEca+DC+xRPyCThTtWYgxjWHgU7ZkyvA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1050,8 +1050,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu@13.4.16: - resolution: {integrity: sha512-KcQGwchAKmZVPa8i5PLTxvTs1/rcFnSltfpTm803Tr/BtBV3AxCkHLfhtoyVtVzx/kl/oue8oS+DSmbepQKwhw==} + /@next/swc-linux-x64-gnu@13.4.19: + resolution: {integrity: sha512-htwOEagMa/CXNykFFeAHHvMJeqZfNQEoQvHfsA4wgg5QqGNqD5soeCer4oGlCol6NGUxknrQO6VEustcv+Md+g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1059,8 +1059,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl@13.4.16: - resolution: {integrity: sha512-2RbMZNxYnJmW8EPHVBsGZPq5zqWAyBOc/YFxq/jIQ/Yn3RMFZ1dZVCjtIcsiaKmgh7mjA/W0ApbumutHNxRqqQ==} + /@next/swc-linux-x64-musl@13.4.19: + resolution: {integrity: sha512-4Gj4vvtbK1JH8ApWTT214b3GwUh9EKKQjY41hH/t+u55Knxi/0wesMzwQRhppK6Ddalhu0TEttbiJ+wRcoEj5Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1068,8 +1068,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc@13.4.16: - resolution: {integrity: sha512-thDcGonELN7edUKzjzlHrdoKkm7y8IAdItQpRvvMxNUXa4d9r0ElofhTZj5emR7AiXft17hpen+QAkcWpqG7Jg==} + /@next/swc-win32-arm64-msvc@13.4.19: + resolution: {integrity: sha512-bUfDevQK4NsIAHXs3/JNgnvEY+LRyneDN788W2NYiRIIzmILjba7LaQTfihuFawZDhRtkYCv3JDC3B4TwnmRJw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1077,8 +1077,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc@13.4.16: - resolution: {integrity: sha512-f7SE1Mo4JAchUWl0LQsbtySR9xCa+x55C0taetjUApKtcLR3AgAjASrrP+oE1inmLmw573qRnE1eZN8YJfEBQw==} + /@next/swc-win32-ia32-msvc@13.4.19: + resolution: {integrity: sha512-Y5kikILFAr81LYIFaw6j/NrOtmiM4Sf3GtOc0pn50ez2GCkr+oejYuKGcwAwq3jiTKuzF6OF4iT2INPoxRycEA==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -1086,8 +1086,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc@13.4.16: - resolution: {integrity: sha512-WamDZm1M/OEM4QLce3lOmD1XdLEl37zYZwlmOLhmF7qYJ2G6oYm9+ejZVv+LakQIsIuXhSpVlOvrxIAHqwRkPQ==} + /@next/swc-win32-x64-msvc@13.4.19: + resolution: {integrity: sha512-YzA78jBDXMYiINdPdJJwGgPNT3YqBNNGhsthsDoWHL9p24tEJn9ViQf/ZqTbwSpX/RrkPupLfuuTH2sf73JBAw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1208,7 +1208,7 @@ packages: '@octokit/request-error': 3.0.3 '@octokit/types': 9.3.2 is-plain-object: 5.0.0 - node-fetch: 2.6.12 + node-fetch: 2.6.13 universal-user-agent: 6.0.0 transitivePeerDependencies: - encoding @@ -1256,7 +1256,7 @@ packages: resolution: {integrity: sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA==} dependencies: asn1js: 3.0.5 - pvtsutils: 1.3.3 + pvtsutils: 1.3.5 tslib: 2.4.1 dev: false @@ -1273,7 +1273,7 @@ packages: dependencies: '@peculiar/asn1-schema': 2.3.6 '@peculiar/json-schema': 1.1.12 - pvtsutils: 1.3.3 + pvtsutils: 1.3.5 tslib: 2.4.1 webcrypto-core: 1.7.7 dev: false @@ -1478,7 +1478,7 @@ packages: /@swc/helpers@0.5.1: resolution: {integrity: sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==} dependencies: - tslib: 2.6.1 + tslib: 2.6.2 dev: false /@szmarczak/http-timer@4.0.6: @@ -1518,7 +1518,7 @@ packages: '@trpc/server': 10.37.1 dev: false - /@trpc/next@10.37.1(@tanstack/react-query@4.32.6)(@trpc/client@10.37.1)(@trpc/react-query@10.37.1)(@trpc/server@10.37.1)(next@13.4.16)(react-dom@18.2.0)(react@18.2.0): + /@trpc/next@10.37.1(@tanstack/react-query@4.32.6)(@trpc/client@10.37.1)(@trpc/react-query@10.37.1)(@trpc/server@10.37.1)(next@13.4.19)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-0KEgr09mBfao56lkj7ZBfVOY86d3+bDH1o0zJkDHSH60Dp/hIJ7wLCnZJIhePlZxEwknCQjVeLsTy4Pqlu8NyQ==} peerDependencies: '@tanstack/react-query': ^4.18.0 @@ -1533,7 +1533,7 @@ packages: '@trpc/client': 10.37.1(@trpc/server@10.37.1) '@trpc/react-query': 10.37.1(@tanstack/react-query@4.32.6)(@trpc/client@10.37.1)(@trpc/server@10.37.1)(react-dom@18.2.0)(react@18.2.0) '@trpc/server': 10.37.1 - next: 13.4.16(react-dom@18.2.0)(react@18.2.0) + next: 13.4.19(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-ssr-prepass: 1.5.0(react@18.2.0) @@ -1563,7 +1563,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 20.5.0 + '@types/node': 20.5.1 dev: false /@types/cacheable-request@6.0.3: @@ -1571,14 +1571,14 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 20.5.0 + '@types/node': 20.5.1 '@types/responselike': 1.0.0 dev: false /@types/connect@3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 20.5.0 + '@types/node': 20.5.1 dev: false /@types/cookies@0.7.7: @@ -1587,7 +1587,7 @@ packages: '@types/connect': 3.4.35 '@types/express': 4.17.14 '@types/keygrip': 1.0.2 - '@types/node': 20.5.0 + '@types/node': 20.5.1 dev: false /@types/eslint@8.44.2: @@ -1604,7 +1604,7 @@ packages: /@types/express-serve-static-core@4.17.35: resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} dependencies: - '@types/node': 20.5.0 + '@types/node': 20.5.1 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -1634,7 +1634,7 @@ packages: /@types/json2csv@5.0.3: resolution: {integrity: sha512-ZJEv6SzhPhgpBpxZU4n/TZekbZqI4EcyXXRwms1lAITG2kIAtj85PfNYafUOY1zy8bWs5ujaub0GU4copaA0sw==} dependencies: - '@types/node': 20.5.0 + '@types/node': 20.5.1 dev: true /@types/json5@0.0.29: @@ -1648,7 +1648,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 20.5.0 + '@types/node': 20.5.1 dev: false /@types/mime@1.3.2: @@ -1662,7 +1662,7 @@ packages: /@types/node-fetch@2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 20.5.0 + '@types/node': 20.5.1 form-data: 3.0.1 dev: false @@ -1674,8 +1674,8 @@ packages: resolution: {integrity: sha512-vmYJF0REqDyyU0gviezF/KHq/fYaUbFhkcNbQCuPGFQj6VTbXuHZoxs/Y7mutWe73C8AC6l9fFu8mSYiBAqkGA==} dev: false - /@types/node@20.5.0: - resolution: {integrity: sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==} + /@types/node@20.5.1: + resolution: {integrity: sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==} /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -1684,7 +1684,7 @@ packages: /@types/pg@8.6.6: resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==} dependencies: - '@types/node': 20.5.0 + '@types/node': 20.5.1 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -1712,7 +1712,7 @@ packages: /@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 20.5.0 + '@types/node': 20.5.1 dev: false /@types/scheduler@0.16.3: @@ -1727,7 +1727,7 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 20.5.0 + '@types/node': 20.5.1 dev: false /@types/serve-static@1.15.2: @@ -1735,7 +1735,7 @@ packages: dependencies: '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 20.5.0 + '@types/node': 20.5.1 dev: false /@typescript-eslint/eslint-plugin@6.4.0(@typescript-eslint/parser@6.4.0)(eslint@8.47.0)(typescript@5.1.6): @@ -1761,7 +1761,7 @@ packages: ignore: 5.2.4 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.1.6) + ts-api-utils: 1.0.2(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color @@ -1810,7 +1810,7 @@ packages: '@typescript-eslint/utils': 6.4.0(eslint@8.47.0)(typescript@5.1.6) debug: 4.3.4 eslint: 8.47.0 - ts-api-utils: 1.0.1(typescript@5.1.6) + ts-api-utils: 1.0.2(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color @@ -1836,7 +1836,7 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.1.6) + ts-api-utils: 1.0.2(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color @@ -2082,7 +2082,7 @@ packages: resolution: {integrity: sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==} engines: {node: '>=12.0.0'} dependencies: - pvtsutils: 1.3.3 + pvtsutils: 1.3.5 pvutils: 1.1.3 tslib: 2.4.1 dev: false @@ -2215,7 +2215,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001521 - electron-to-chromium: 1.4.492 + electron-to-chromium: 1.4.496 node-releases: 2.0.13 update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: false @@ -2748,8 +2748,8 @@ packages: wordwrap: 1.0.0 dev: true - /drizzle-kit@0.19.12: - resolution: {integrity: sha512-rcsmh5gUIkvuD0WrbEc+aLpqY2q2J8ltynRcJiJo2l01hhsYvPnX0sgxWlFXlfAIa5ZXNw2nJZhYlslI6tG3MA==} + /drizzle-kit@0.19.13: + resolution: {integrity: sha512-Rba5VW1O2JfJlwVBeZ8Zwt2E2us5oZ08PQBDiVSGlug53TOc8hzXjblZFuF+dnll9/RQEHrkzBmJFgqTvn5Rxg==} hasBin: true dependencies: '@drizzle-team/studio': 0.0.5 @@ -2763,12 +2763,12 @@ packages: hanji: 0.0.5 json-diff: 0.9.0 minimatch: 7.4.6 - zod: 3.22.1 + zod: 3.22.2 transitivePeerDependencies: - supports-color dev: true - /drizzle-orm@0.28.2(@neondatabase/serverless@0.5.7)(pg@8.11.3): + /drizzle-orm@0.28.2(@neondatabase/serverless@0.6.0)(pg@8.11.3): resolution: {integrity: sha512-QRyuzvpJr7GE6LpvZ/sg2nAKNg2if1uGGkgFTiXn4auuYId//vVJe6HBsDTktfKfcaDGzIYos+/f+PS5EkBmrg==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' @@ -2830,7 +2830,7 @@ packages: sqlite3: optional: true dependencies: - '@neondatabase/serverless': 0.5.7 + '@neondatabase/serverless': 0.6.0 pg: 8.11.3 dev: false @@ -2851,8 +2851,8 @@ packages: semver: 7.5.4 dev: false - /electron-to-chromium@1.4.492: - resolution: {integrity: sha512-36K9b/6skMVwAIEsC7GiQ8I8N3soCALVSHqWHzNDtGemAcI9Xu8hP02cywWM0A794rTHm0b0zHPeLJHtgFVamQ==} + /electron-to-chromium@1.4.496: + resolution: {integrity: sha512-qeXC3Zbykq44RCrBa4kr8v/dWzYJA8rAwpyh9Qd+NKWoJfjG5vvJqy9XOJ9H4P/lqulZBCgUWAYi+FeK5AuJ8g==} dev: false /emoji-regex@9.2.2: @@ -2929,14 +2929,18 @@ packages: which-typed-array: 1.1.11 dev: true - /es-iterator-helpers@1.0.12: - resolution: {integrity: sha512-T6Ldv67RYULYtZ1k1omngDTVQSTVNX/ZSjDiwlw0PMokhy8kq2LFElleaEjpvlSaXh9ugJ4zrBgbQ7L+Bjdm3Q==} + /es-iterator-helpers@1.0.13: + resolution: {integrity: sha512-LK3VGwzvaPWobO8xzXXGRUOGw8Dcjyfk62CsY/wfHN75CwsJPbuypOYJxK6g5RyEL8YDjIWcl6jgd8foO6mmrA==} dependencies: asynciterator.prototype: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.0 es-abstract: 1.22.1 es-set-tostringtag: 2.0.1 function-bind: 1.1.1 + get-intrinsic: 1.2.1 globalthis: 1.0.3 + has-property-descriptors: 1.0.0 has-proto: 1.0.1 has-symbols: 1.0.3 internal-slot: 1.0.5 @@ -3118,8 +3122,8 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-next@13.4.16(eslint@8.47.0)(typescript@5.1.6): - resolution: {integrity: sha512-Of73d/FiaGf0GLCxxTGdh4rW8bRDvsqypylefkshE/uDDpQr8ifVQsD4UiB99rhegks7nJGkYtUnR3dC7kfFlw==} + /eslint-config-next@13.4.19(eslint@8.47.0)(typescript@5.1.6): + resolution: {integrity: sha512-WE8367sqMnjhWHvR5OivmfwENRQ1ixfNE9hZwQqNCsd+iM3KnuMc1V8Pt6ytgjxjf23D+xbesADv9x3xaKfT3g==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -3127,16 +3131,16 @@ packages: typescript: optional: true dependencies: - '@next/eslint-plugin-next': 13.4.16 + '@next/eslint-plugin-next': 13.4.19 '@rushstack/eslint-patch': 1.3.3 '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.1.6) eslint: 8.47.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.0)(eslint@8.47.0) - eslint-plugin-import: 2.28.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) + eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.47.0) eslint-plugin-react: 7.33.2(eslint@8.47.0) - eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.47.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.47.0) typescript: 5.1.6 transitivePeerDependencies: - eslint-import-resolver-webpack @@ -3153,7 +3157,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.0)(eslint@8.47.0): + /eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0): resolution: {integrity: sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -3164,7 +3168,7 @@ packages: enhanced-resolve: 5.15.0 eslint: 8.47.0 eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) - eslint-plugin-import: 2.28.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) fast-glob: 3.3.1 get-tsconfig: 4.7.0 is-core-module: 2.13.0 @@ -3201,13 +3205,13 @@ packages: debug: 3.2.7 eslint: 8.47.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.0)(eslint@8.47.0) + eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0) transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import@2.28.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0): - resolution: {integrity: sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==} + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0): + resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -3233,7 +3237,6 @@ packages: object.fromentries: 2.0.6 object.groupby: 1.0.0 object.values: 1.1.6 - resolve: 1.22.4 semver: 6.3.1 tsconfig-paths: 3.14.2 transitivePeerDependencies: @@ -3267,8 +3270,8 @@ packages: semver: 6.3.1 dev: true - /eslint-plugin-react-hooks@5.0.0-canary-7118f5dd7-20230705(eslint@8.47.0): - resolution: {integrity: sha512-AZYbMo/NW9chdL7vk6HQzQhT+PvTAEVqWk9ziruUoW2kAOcN5qNyelv70e0F1VNQAbvutOC9oc+xfWycI9FxDw==} + /eslint-plugin-react-hooks@4.6.0(eslint@8.47.0): + resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 @@ -3286,7 +3289,7 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 - es-iterator-helpers: 1.0.12 + es-iterator-helpers: 1.0.13 eslint: 8.47.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 @@ -4163,7 +4166,7 @@ packages: /isomorphic-fetch@3.0.0: resolution: {integrity: sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==} dependencies: - node-fetch: 2.6.12 + node-fetch: 2.6.13 whatwg-fetch: 3.6.17 transitivePeerDependencies: - encoding @@ -4179,8 +4182,8 @@ packages: reflect.getprototypeof: 1.0.3 dev: true - /jiti@1.19.1: - resolution: {integrity: sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==} + /jiti@1.19.3: + resolution: {integrity: sha512-5eEbBDQT/jF1xg6l36P+mWGGoH9Spuy0PCdSr2dtWRDGC6ph/w9ZCL4lmESW8f8F7MwT3XKescfP0wnZWAKL9w==} hasBin: true dev: true @@ -4529,8 +4532,8 @@ packages: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} dev: true - /next@13.4.16(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-1xaA/5DrfpPu0eV31Iro7JfPeqO8uxQWb1zYNTe+KDKdzqkAGapLcDYHMLNKXKB7lHjZ7LfKUOf9dyuzcibrhA==} + /next@13.4.19(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-HuPSzzAbJ1T4BD8e0bs6B9C1kWQ6gv8ykZoRWs5AQoiIuqbGHHdQO7Ljuvg05Q0Z24E2ABozHe6FxDvI6HfyAw==} engines: {node: '>=16.8.0'} hasBin: true peerDependencies: @@ -4544,7 +4547,7 @@ packages: sass: optional: true dependencies: - '@next/env': 13.4.16 + '@next/env': 13.4.19 '@swc/helpers': 0.5.1 busboy: 1.6.0 caniuse-lite: 1.0.30001521 @@ -4555,27 +4558,27 @@ packages: watchpack: 2.4.0 zod: 3.21.4 optionalDependencies: - '@next/swc-darwin-arm64': 13.4.16 - '@next/swc-darwin-x64': 13.4.16 - '@next/swc-linux-arm64-gnu': 13.4.16 - '@next/swc-linux-arm64-musl': 13.4.16 - '@next/swc-linux-x64-gnu': 13.4.16 - '@next/swc-linux-x64-musl': 13.4.16 - '@next/swc-win32-arm64-msvc': 13.4.16 - '@next/swc-win32-ia32-msvc': 13.4.16 - '@next/swc-win32-x64-msvc': 13.4.16 + '@next/swc-darwin-arm64': 13.4.19 + '@next/swc-darwin-x64': 13.4.19 + '@next/swc-linux-arm64-gnu': 13.4.19 + '@next/swc-linux-arm64-musl': 13.4.19 + '@next/swc-linux-x64-gnu': 13.4.19 + '@next/swc-linux-x64-musl': 13.4.19 + '@next/swc-win32-arm64-msvc': 13.4.19 + '@next/swc-win32-ia32-msvc': 13.4.19 + '@next/swc-win32-x64-msvc': 13.4.19 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros dev: false - /nextjs-cors@2.1.2(next@13.4.16): + /nextjs-cors@2.1.2(next@13.4.19): resolution: {integrity: sha512-2yOVivaaf2ILe4f/qY32hnj3oC77VCOsUQJQfhVMGsXE/YMEWUY2zy78sH9FKUCM7eG42/l3pDofIzMD781XGA==} peerDependencies: next: ^8.1.1-canary.54 || ^9.0.0 || ^10.0.0-0 || ^11.0.0 || ^12.0.0 || ^13.0.0 dependencies: cors: 2.8.5 - next: 13.4.16(react-dom@18.2.0)(react@18.2.0) + next: 13.4.19(react-dom@18.2.0)(react@18.2.0) dev: false /no-case@3.0.4: @@ -4585,8 +4588,8 @@ packages: tslib: 2.4.1 dev: false - /node-abi@3.46.0: - resolution: {integrity: sha512-LXvP3AqTIrtvH/jllXjkNVbYifpRbt9ThTtymSMSuHmhugQLAWr99QQFTm+ZRht9ziUvdGOgB+esme1C6iE6Lg==} + /node-abi@3.47.0: + resolution: {integrity: sha512-2s6B2CWZM//kPgwnuI0KrYwNjfdByE25zvAaEpq9IH4zcNsarH8Ihu/UuX6XMPEogDAxkuUFeZn60pXNHAqn3A==} engines: {node: '>=10'} dependencies: semver: 7.5.4 @@ -4612,6 +4615,18 @@ packages: whatwg-url: 5.0.0 dev: false + /node-fetch@2.6.13: + resolution: {integrity: sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: false + /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} dev: false @@ -5106,7 +5121,7 @@ packages: minimist: 1.2.8 mkdirp-classic: 0.5.3 napi-build-utils: 1.0.2 - node-abi: 3.46.0 + node-abi: 3.47.0 pump: 3.0.0 rc: 1.2.8 simple-get: 4.0.1 @@ -5161,10 +5176,10 @@ packages: engines: {node: '>=6'} dev: true - /pvtsutils@1.3.3: - resolution: {integrity: sha512-6sAOMlXyrJ+8tRN5IAaYfuYZRp1C2uJ0SyDynEFxL+VY8kCRib9Lpj/+KPaNFpaQWr/iRik5nrzz6iaNlxgEGA==} + /pvtsutils@1.3.5: + resolution: {integrity: sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==} dependencies: - tslib: 2.6.1 + tslib: 2.6.2 dev: false /pvutils@1.1.3: @@ -5837,7 +5852,7 @@ packages: fast-glob: 3.3.1 glob-parent: 6.0.2 is-glob: 4.0.3 - jiti: 1.19.1 + jiti: 1.19.3 lilconfig: 2.1.0 micromatch: 4.0.5 normalize-path: 3.0.0 @@ -5963,8 +5978,8 @@ packages: pretty-bytes: 5.6.0 dev: false - /ts-api-utils@1.0.1(typescript@5.1.6): - resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} + /ts-api-utils@1.0.2(typescript@5.1.6): + resolution: {integrity: sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' @@ -5989,8 +6004,8 @@ packages: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} dev: false - /tslib@2.6.1: - resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: false /tunnel-agent@0.6.0: @@ -6187,7 +6202,7 @@ packages: '@peculiar/asn1-schema': 2.3.6 '@peculiar/json-schema': 1.1.12 asn1js: 3.0.5 - pvtsutils: 1.3.3 + pvtsutils: 1.3.5 tslib: 2.4.1 dev: false @@ -6308,5 +6323,5 @@ packages: resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==} dev: false - /zod@3.22.1: - resolution: {integrity: sha512-+qUhAMl414+Elh+fRNtpU+byrwjDFOS1N7NioLY+tSlcADTx4TkCUua/hxJvxwDXcV4397/nZ420jy4n4+3WUg==} + /zod@3.22.2: + resolution: {integrity: sha512-wvWkphh5WQsJbVk1tbx1l1Ly4yg+XecD+Mq280uBGt9wa5BKSWf4Mhp6GmrkPixhMxmabYY7RbzlwVP32pbGCg==} diff --git a/src/server/schema.ts b/src/server/schema.ts index acf58fe..8c6e4a2 100644 --- a/src/server/schema.ts +++ b/src/server/schema.ts @@ -4,6 +4,7 @@ import { varchar, boolean, json, + index, } from "drizzle-orm/pg-core"; import { relations } from "drizzle-orm"; @@ -22,15 +23,23 @@ export const roomsRelations = relations(rooms, ({ many }) => ({ logs: many(logs), })); -export const votes = pgTable("Vote", { - id: varchar("id", { length: 255 }).notNull().primaryKey(), - created_at: timestamp("created_at").defaultNow(), - userId: varchar("userId", { length: 255 }).notNull(), - roomId: varchar("roomId", { length: 255 }) - .notNull() - .references(() => rooms.id, { onDelete: "cascade" }), - value: varchar("value", { length: 255 }).notNull(), -}); +export const votes = pgTable( + "Vote", + { + id: varchar("id", { length: 255 }).notNull().primaryKey(), + created_at: timestamp("created_at").defaultNow(), + userId: varchar("userId", { length: 255 }).notNull(), + roomId: varchar("roomId", { length: 255 }) + .notNull() + .references(() => rooms.id, { onDelete: "cascade" }), + value: varchar("value", { length: 255 }).notNull(), + }, + (table) => { + return { + userIdx: index("user_idx").on(table.userId), + }; + } +); export const votesRelations = relations(votes, ({ one }) => ({ room: one(rooms, { @@ -39,20 +48,28 @@ export const votesRelations = relations(votes, ({ one }) => ({ }), })); -export const logs = pgTable("Log", { - id: varchar("id", { length: 255 }).notNull().primaryKey(), - created_at: timestamp("created_at").defaultNow(), - userId: varchar("userId", { length: 255 }) - .notNull() - .references(() => rooms.id, { onDelete: "cascade" }), - roomId: varchar("roomId", { length: 255 }) - .notNull() - .references(() => rooms.id, { onDelete: "cascade" }), - scale: varchar("scale", { length: 255 }), - votes: json("votes"), - roomName: varchar("roomName", { length: 255 }), - storyName: varchar("storyName", { length: 255 }), -}); +export const logs = pgTable( + "Log", + { + id: varchar("id", { length: 255 }).notNull().primaryKey(), + created_at: timestamp("created_at").defaultNow(), + userId: varchar("userId", { length: 255 }) + .notNull() + .references(() => rooms.id, { onDelete: "cascade" }), + roomId: varchar("roomId", { length: 255 }) + .notNull() + .references(() => rooms.id, { onDelete: "cascade" }), + scale: varchar("scale", { length: 255 }), + votes: json("votes"), + roomName: varchar("roomName", { length: 255 }), + storyName: varchar("storyName", { length: 255 }), + }, + (table) => { + return { + userIdx: index("user_idx").on(table.userId), + }; + } +); export const logsRelations = relations(logs, ({ one }) => ({ room: one(rooms, {