diff --git a/package.json b/package.json index 0c0078a..695d9ad 100644 --- a/package.json +++ b/package.json @@ -14,20 +14,21 @@ }, "dependencies": { "@next-auth/prisma-adapter": "^1.0.5", - "@next/eslint-plugin-next": "13.1.2", - "@next/font": "13.1.2", + "@next/eslint-plugin-next": "13.1.5", + "@next/font": "13.1.5", "@prisma/client": "^4.8.0", "@radix-ui/react-dialog": "^1.0.2", "@radix-ui/react-dropdown-menu": "^2.0.1", "@radix-ui/react-popover": "^1.0.2", "@radix-ui/react-tabs": "^1.0.1", "@radix-ui/react-tooltip": "^1.0.2", + "@vercel/og": "^0.0.27", "@wcj/markdown-to-html": "^2.1.2", "client-only": "^0.0.1", "client-zip": "2.2.1", "jest": "^29.3.1", "lodash.debounce": "^4.0.8", - "next": "13.1.2", + "next": "13.1.5", "next-auth": "^4.18.6", "next-themes": "^0.2.1", "react": "18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 98f1f62..b543301 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,8 +3,8 @@ lockfileVersion: 5.4 specifiers: '@next-auth/prisma-adapter': ^1.0.5 '@next/bundle-analyzer': 13.0.7-canary.4 - '@next/eslint-plugin-next': 13.1.2 - '@next/font': 13.1.2 + '@next/eslint-plugin-next': 13.1.5 + '@next/font': 13.1.5 '@prisma/client': ^4.8.0 '@radix-ui/react-dialog': ^1.0.2 '@radix-ui/react-dropdown-menu': ^2.0.1 @@ -20,6 +20,7 @@ specifiers: '@types/uuid': ^9.0.0 '@typescript-eslint/eslint-plugin': ^5.46.1 '@typescript-eslint/parser': ^5.46.1 + '@vercel/og': ^0.0.27 '@wcj/markdown-to-html': ^2.1.2 client-only: ^0.0.1 client-zip: 2.2.1 @@ -30,7 +31,7 @@ specifiers: eslint-config-next: 13.0.3 jest: ^29.3.1 lodash.debounce: ^4.0.8 - next: 13.1.2 + next: 13.1.5 next-auth: ^4.18.6 next-themes: ^0.2.1 next-unused: 0.0.6 @@ -53,22 +54,23 @@ specifiers: dependencies: '@next-auth/prisma-adapter': 1.0.5_fmf72d7n4jt7coiyftaa4dlrhe - '@next/eslint-plugin-next': 13.1.2 - '@next/font': 13.1.2 + '@next/eslint-plugin-next': 13.1.5 + '@next/font': 13.1.5 '@prisma/client': 4.8.0_prisma@4.8.0 '@radix-ui/react-dialog': 1.0.2_jbvntnid6ohjelon6ccj5dhg2u '@radix-ui/react-dropdown-menu': 2.0.1_jbvntnid6ohjelon6ccj5dhg2u '@radix-ui/react-popover': 1.0.2_jbvntnid6ohjelon6ccj5dhg2u '@radix-ui/react-tabs': 1.0.1_biqbaboplfbrettd7655fr4n2y '@radix-ui/react-tooltip': 1.0.2_jbvntnid6ohjelon6ccj5dhg2u + '@vercel/og': 0.0.27 '@wcj/markdown-to-html': 2.1.2 client-only: 0.0.1 client-zip: 2.2.1 jest: 29.3.1_@types+node@17.0.23 lodash.debounce: 4.0.8 - next: 13.1.2_biqbaboplfbrettd7655fr4n2y - next-auth: 4.18.6_7jnwqgtpcnwg4nzft4b6xlzlfi - next-themes: 0.2.1_7jnwqgtpcnwg4nzft4b6xlzlfi + next: 13.1.5_biqbaboplfbrettd7655fr4n2y + next-auth: 4.18.6_s6zlkfvllybxhmcq5pkr2zsuza + next-themes: 0.2.1_s6zlkfvllybxhmcq5pkr2zsuza react: 18.2.0 react-datepicker: 4.8.0_biqbaboplfbrettd7655fr4n2y react-dom: 18.2.0_react@18.2.0 @@ -792,7 +794,7 @@ packages: next-auth: ^4 dependencies: '@prisma/client': 4.8.0_prisma@4.8.0 - next-auth: 4.18.6_7jnwqgtpcnwg4nzft4b6xlzlfi + next-auth: 4.18.6_s6zlkfvllybxhmcq5pkr2zsuza dev: false /@next/bundle-analyzer/13.0.7-canary.4: @@ -804,8 +806,8 @@ packages: - utf-8-validate dev: true - /@next/env/13.1.2: - resolution: {integrity: sha512-PpT4UZIX66VMTqXt4HKEJ+/PwbS+tWmmhZlazaws1a+dbUA5pPdjntQ46Jvj616i3ZKN9doS9LHx3y50RLjAWg==} + /@next/env/13.1.5: + resolution: {integrity: sha512-0Ry4NhJy6qLbXhvxPRUQ1H6RzgtryGdUto7hfgAK0Iw/bScgeVjwLZdfhm2iT7qsOS32apo9cWzLCxjc6iGPsA==} dev: false /@next/eslint-plugin-next/13.0.3: @@ -814,18 +816,18 @@ packages: glob: 7.1.7 dev: true - /@next/eslint-plugin-next/13.1.2: - resolution: {integrity: sha512-WGaNVvIYphdriesP6r7jq/8l7u38tzotnVQuxc1RYKLqYYApSsrebti3OCPoT3Gx0pw2smPIFHH98RzcsgW5GQ==} + /@next/eslint-plugin-next/13.1.5: + resolution: {integrity: sha512-3kvLTX35bOWOCKU8KY74Ygczc55Qk/kB2TQy0tH7Rti6hzZ6Aij7WQ8zHdIVjmnlD0n/zXWXrIf5y56RKcLQkQ==} dependencies: glob: 7.1.7 dev: false - /@next/font/13.1.2: - resolution: {integrity: sha512-NXGXGFGiOKEnvBIHq9cdFTKbHO2/4B3Zd9K27M7j1DioIQVar7oVRqZMYs0h3XMVEZLwjjkdAtqRPCzzd3RtXg==} + /@next/font/13.1.5: + resolution: {integrity: sha512-6M5R6yC3JkdJiqo/YJxDp6+0vDn0smXOAzl8uHt4qmDS2u53ji/19K0HM51d+5kg8xntDi+N2hw7YjaU9inkNA==} dev: false - /@next/swc-android-arm-eabi/13.1.2: - resolution: {integrity: sha512-7mRz1owoGsbfIcdOJA3kk7KEwPZ+OvVT1z9DkR/yru4QdVLF69h/1SHy0vlUNQMxDRllabhxCfkoZCB34GOGAg==} + /@next/swc-android-arm-eabi/13.1.5: + resolution: {integrity: sha512-QAEf3YM9U0qWVQTxgF3Tsh4OeCN1i9Smsf6cVlwZsPzoLyj2nQ879joCoN+ONqDknkBgG6OG/ajefywL3jw9Cg==} engines: {node: '>= 10'} cpu: [arm] os: [android] @@ -833,8 +835,8 @@ packages: dev: false optional: true - /@next/swc-android-arm64/13.1.2: - resolution: {integrity: sha512-mgjZ2eJSayovQm1LcE54BLSI4jjnnnLtq5GY5g+DdPuUiCT644gKtjZ/w2BQvuIecCqqBO+Ph9yzo/wUTq7NLg==} + /@next/swc-android-arm64/13.1.5: + resolution: {integrity: sha512-ZmtGPTghRuT5YKL0nNcC2bBVSiG1O0is16eIZ2rWSP/hRW64ZCcAew6pxw2rihntNp22UfequjSTHd91WE/tyQ==} engines: {node: '>= 10'} cpu: [arm64] os: [android] @@ -842,8 +844,8 @@ packages: dev: false optional: true - /@next/swc-darwin-arm64/13.1.2: - resolution: {integrity: sha512-RikoQqy109r2222UJlyGs4dZw2BibkfPqpeFdW5JEGv+L2PStlHID8DwyVYbmHfQ0VIBGvbf/NAUtFakAWlhwg==} + /@next/swc-darwin-arm64/13.1.5: + resolution: {integrity: sha512-aeFXK+M/zmG/CNdMJ0tGNs0MWcLueUe7vZ2V6fa+2yz/ZgYJLI7fEfFvVh1p1yBMzupSbZDowvMuCSFTaeg3MA==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -851,8 +853,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64/13.1.2: - resolution: {integrity: sha512-JbDZjaTvL8gyPC5TAH6OnD4jmXPkyUxRYPvu08ZmhT/XAFBb/Cso0BdXyDax/BPCG70mimP9d3hXNKNq+A0VtQ==} + /@next/swc-darwin-x64/13.1.5: + resolution: {integrity: sha512-6mPX0GNRg8NzjV70at8I8pD9YBnPHDpxJCoMuIqysdTjtQhd09Xk6GUhquNhp1kEJzzVk7OW5l2ch4XIJjtY3A==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -860,8 +862,8 @@ packages: dev: false optional: true - /@next/swc-freebsd-x64/13.1.2: - resolution: {integrity: sha512-ax4j8VrdFQ/xc3W7Om0u1vnDxVApQHKsChBbAMynCrnycZmpbqK4MZu4ZkycT+mx2eccCiqZROpbzDbEdPosEw==} + /@next/swc-freebsd-x64/13.1.5: + resolution: {integrity: sha512-nR4a/SNblG0w8hhYRflTZjk4yD99ld18w/FCftw99ziw8sgciBlOXRICJIiRIaMRU8UH7QLSgBOQVnfNcVNKMA==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] @@ -869,8 +871,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm-gnueabihf/13.1.2: - resolution: {integrity: sha512-NcRHTesnCxnUvSJa637PQJffBBkmqi5XS/xVWGY7dI6nyJ+pC96Oj7kd+mcjnFUQI5lHKbg39qBWKtOzbezc4w==} + /@next/swc-linux-arm-gnueabihf/13.1.5: + resolution: {integrity: sha512-EzkltCVKg3gUzamoeKPhGeSgXTTLAhSzc7v/+g1Y+HQa7JKMrlzdRkrJf+H4LJXcz7lnxgNKHGRyZBSXnmJKJw==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -878,8 +880,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu/13.1.2: - resolution: {integrity: sha512-AxJdjocLtPrsBY4P2COSBIc3crT5bpjgGenNuINoensOlXhBkYM0aRDYZdydwXOhG+kN2ngUvfgitop9pa204w==} + /@next/swc-linux-arm64-gnu/13.1.5: + resolution: {integrity: sha512-E7HMkdoxStmTUJU4KzBUU4vZ5DHT4Gd327tC3KFZS5lda0NRerJAOCfsRg+fBj22FvCb1UWsX6XI+weL6xhyeQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -887,8 +889,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl/13.1.2: - resolution: {integrity: sha512-JmNimDkcCRq7P5zpkdqeaSZ69qKDntEPtyIaMNWqy5M0WUJxGim0Fs6Qzxayiyvuuh9Guxks4woQ/j/ZvX/c8Q==} + /@next/swc-linux-arm64-musl/13.1.5: + resolution: {integrity: sha512-qlO0Fd3GQwJS6YpbF9NyL5NGHVZ43dKtZDC/jP4vdeMIYDtSu13HcY/nmA1NdW+RpMwDxSCpx4WKsCCEZGIX8Q==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -896,8 +898,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu/13.1.2: - resolution: {integrity: sha512-TsLsjZwUlgmvI42neTuIoD6K9RlXCUzqPtvIClgXxVO0um0DiZwK+M+0zX/uVXhMVphfPY2c5YeR1zFSIONY4A==} + /@next/swc-linux-x64-gnu/13.1.5: + resolution: {integrity: sha512-GftSBFAay2nocGl+KNqFsj6EVSvomaM/bp86hzezbKsTwQmu76PjOCVcejI1gE+4k7f5zPDgCuorF6F04BV0HQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -905,8 +907,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl/13.1.2: - resolution: {integrity: sha512-eSkyXgCXydEFPTkcncQOGepafedPte6JT/OofB9uvruucrrMVBagCASOuPxodWEMrlfEKSXVnExMKIlfmQMD7A==} + /@next/swc-linux-x64-musl/13.1.5: + resolution: {integrity: sha512-UD+3lxU4yuAjd+uBkCDfBpAcbGAVfEcE8mX/efIxUGIImmzN0QzgTHYEpKFnY3Lxu02dIBcwQRT3Q5mfO4obng==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -914,8 +916,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc/13.1.2: - resolution: {integrity: sha512-DmXFaRTgt2KrV9dmRLifDJE+cYiutHVFIw5/C9BtnwXH39uf3YbPxeD98vNrtqqqZVVLXY/1ySaSIwzYnqeY9g==} + /@next/swc-win32-arm64-msvc/13.1.5: + resolution: {integrity: sha512-uzsvkQY+K3EbL+97IUHPWZPwjsCmCkdH/O5Cf9wCnh0k0gaj7ob1mGKqr1vNNak+9U7HloGwuHcXnZpijWSP7w==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -923,8 +925,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc/13.1.2: - resolution: {integrity: sha512-3+nBkuFs/wT+lmRVQNH5SyDT7I4vUlNPntosEaEP63FuYQdPLaxz0GvcR66MdFSFh2fsvazpe4wciOwVS4FItQ==} + /@next/swc-win32-ia32-msvc/13.1.5: + resolution: {integrity: sha512-v0NaC1w8mPf620GlJaHBdEm3dm4G4AEQMasDqjzQvo0yCRrvtvzMgCIe8MocBxFHzaF6868NybMqvumxP5YxEg==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -932,8 +934,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc/13.1.2: - resolution: {integrity: sha512-avsyveEvcvH42PvKjR4Pb8JlLttuGURr2H3ZhS2b85pHOiZ7yjH3rMUoGnNzuLMApyxYaCvd4MedPrLhnNhkog==} + /@next/swc-win32-x64-msvc/13.1.5: + resolution: {integrity: sha512-IZHwvd649ccbWyLCfu92IXEpR250NpmBkaRelPV+WVm4jrd62FKRFCNdqdCXq6TrEg9wN8cK4YG8tm44uEZqLA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1419,10 +1421,24 @@ packages: '@babel/runtime': 7.20.1 dev: false + /@resvg/resvg-wasm/2.0.0-alpha.4: + resolution: {integrity: sha512-pWIG9a/x1ky8gXKRhPH1OPKpHFoMN1ISLbJ+O+gPXQHIAKhNd5I28RlWf7q576hAOQA9JZTlo3p/M2uyLzJmmw==} + engines: {node: '>= 10'} + dev: false + /@rushstack/eslint-patch/1.2.0: resolution: {integrity: sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==} dev: true + /@shuding/opentype.js/1.4.0-beta.0: + resolution: {integrity: sha512-3NgmNyH3l/Hv6EvsWJbsvpcpUba6R8IREQ83nH83cyakCw7uM1arZKNfHwv1Wz6jgqrF/j4x5ELvR6PnK9nTcA==} + engines: {node: '>= 8.0.0'} + hasBin: true + dependencies: + fflate: 0.7.4 + string.prototype.codepointat: 0.2.1 + dev: false + /@sinclair/typebox/0.24.51: resolution: {integrity: sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==} dev: false @@ -1781,6 +1797,15 @@ packages: eslint-visitor-keys: 3.3.0 dev: true + /@vercel/og/0.0.27: + resolution: {integrity: sha512-cUk6HmfLmBOISAA8gvPRNUx3eVOSyXblxiuv3uN9UTxLwdalQzPlHC/0byvTMR1eVi0y1trD5u6um/4xiTqgOQ==} + engines: {node: '>=16'} + dependencies: + '@resvg/resvg-wasm': 2.0.0-alpha.4 + satori: 0.0.46 + yoga-wasm-web: 0.3.0 + dev: false + /@wcj/markdown-to-html/2.1.2: resolution: {integrity: sha512-HJCbXY9YsFV12JPbYM6iXadOJWLhS1sjAp4L4nXoVxdgD9ArkU3I9QlpH4VTcDHutDLOKVXelarWhs5qqqIm7w==} dependencies: @@ -2149,6 +2174,10 @@ packages: engines: {node: '>=10'} dev: false + /camelize/1.0.1: + resolution: {integrity: sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==} + dev: false + /caniuse-lite/1.0.30001431: resolution: {integrity: sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==} dev: false @@ -2382,6 +2411,19 @@ packages: shebang-command: 2.0.0 which: 2.0.2 + /css-background-parser/0.1.0: + resolution: {integrity: sha512-2EZLisiZQ+7m4wwur/qiYJRniHX4K5Tc9w93MT3AS0WS1u5kaZ4FKXlOTBhOjc+CgEgPiGY+fX1yWD8UwpEqUA==} + dev: false + + /css-box-shadow/1.0.0-3: + resolution: {integrity: sha512-9jaqR6e7Ohds+aWwmhe6wILJ99xYQbfmK9QQB9CcMjDbTxPZjwEmUQpU91OG05Xgm8BahT5fW+svbsQGjS/zPg==} + dev: false + + /css-color-keywords/1.0.0: + resolution: {integrity: sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==} + engines: {node: '>=4'} + dev: false + /css-parse/2.0.0: resolution: {integrity: sha512-UNIFik2RgSbiTwIW1IsFwXWn6vs+bYdq83LKTSOsx7NJR7WII9dxewkHLltfTLVppoUApHV0118a4RZRI9FLwA==} dependencies: @@ -2399,6 +2441,14 @@ packages: fastparse: 1.1.2 dev: true + /css-to-react-native/3.1.0: + resolution: {integrity: sha512-AryfkFA29b4I3vG7N4kxFboq15DxwSXzhXM37XNEjwJMgjYIc8BcqfiprpAqX0zadI5PMByEIwAMzXxk5Vcc4g==} + dependencies: + camelize: 1.0.1 + css-color-keywords: 1.0.0 + postcss-value-parser: 4.2.0 + dev: false + /css/2.2.4: resolution: {integrity: sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==} dependencies: @@ -2700,6 +2750,10 @@ packages: engines: {node: '>=12'} dev: false + /emoji-regex/10.2.1: + resolution: {integrity: sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==} + dev: false + /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: false @@ -3210,6 +3264,10 @@ packages: bser: 2.1.1 dev: false + /fflate/0.7.4: + resolution: {integrity: sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw==} + dev: false + /file-entry-cache/6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -5204,7 +5262,7 @@ packages: dev: true optional: true - /next-auth/4.18.6_7jnwqgtpcnwg4nzft4b6xlzlfi: + /next-auth/4.18.6_s6zlkfvllybxhmcq5pkr2zsuza: resolution: {integrity: sha512-0TQwbq5X9Jyd1wUVYUoyvHJh4JWXeW9UOcMEl245Er/Y5vsSbyGJHt8M7xjRMzk9mORVMYehoMdERgyiq/jCgA==} engines: {node: ^12.19.0 || ^14.15.0 || ^16.13.0 || ^18.12.0} peerDependencies: @@ -5220,7 +5278,7 @@ packages: '@panva/hkdf': 1.0.2 cookie: 0.5.0 jose: 4.11.0 - next: 13.1.2_biqbaboplfbrettd7655fr4n2y + next: 13.1.5_biqbaboplfbrettd7655fr4n2y oauth: 0.9.15 openid-client: 5.3.0 preact: 10.11.2 @@ -5230,14 +5288,14 @@ packages: uuid: 8.3.2 dev: false - /next-themes/0.2.1_7jnwqgtpcnwg4nzft4b6xlzlfi: + /next-themes/0.2.1_s6zlkfvllybxhmcq5pkr2zsuza: resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==} peerDependencies: next: '*' react: '*' react-dom: '*' dependencies: - next: 13.1.2_biqbaboplfbrettd7655fr4n2y + next: 13.1.5_biqbaboplfbrettd7655fr4n2y react: 18.2.0 react-dom: 18.2.0_react@18.2.0 dev: false @@ -5253,8 +5311,8 @@ packages: - supports-color dev: true - /next/13.1.2_biqbaboplfbrettd7655fr4n2y: - resolution: {integrity: sha512-Rdnnb2YH///w78FEOR/IQ6TXga+qpth4OqFSem48ng1PYYKr6XBsIk1XVaRcIGM3o6iiHnun0nJvkJHDf+ICyQ==} + /next/13.1.5_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-rmpYZFCxxWAi2nJCT9sSqMLGC3cu+Pf689hx9clcyP0KbVIhh/7Dus5QcKrVd/PrAd6AjsuogSRR1mCP7BoYRw==} engines: {node: '>=14.6.0'} hasBin: true peerDependencies: @@ -5271,7 +5329,7 @@ packages: sass: optional: true dependencies: - '@next/env': 13.1.2 + '@next/env': 13.1.5 '@swc/helpers': 0.4.14 caniuse-lite: 1.0.30001431 postcss: 8.4.14 @@ -5279,19 +5337,19 @@ packages: react-dom: 18.2.0_react@18.2.0 styled-jsx: 5.1.1_react@18.2.0 optionalDependencies: - '@next/swc-android-arm-eabi': 13.1.2 - '@next/swc-android-arm64': 13.1.2 - '@next/swc-darwin-arm64': 13.1.2 - '@next/swc-darwin-x64': 13.1.2 - '@next/swc-freebsd-x64': 13.1.2 - '@next/swc-linux-arm-gnueabihf': 13.1.2 - '@next/swc-linux-arm64-gnu': 13.1.2 - '@next/swc-linux-arm64-musl': 13.1.2 - '@next/swc-linux-x64-gnu': 13.1.2 - '@next/swc-linux-x64-musl': 13.1.2 - '@next/swc-win32-arm64-msvc': 13.1.2 - '@next/swc-win32-ia32-msvc': 13.1.2 - '@next/swc-win32-x64-msvc': 13.1.2 + '@next/swc-android-arm-eabi': 13.1.5 + '@next/swc-android-arm64': 13.1.5 + '@next/swc-darwin-arm64': 13.1.5 + '@next/swc-darwin-x64': 13.1.5 + '@next/swc-freebsd-x64': 13.1.5 + '@next/swc-linux-arm-gnueabihf': 13.1.5 + '@next/swc-linux-arm64-gnu': 13.1.5 + '@next/swc-linux-arm64-musl': 13.1.5 + '@next/swc-linux-x64-gnu': 13.1.5 + '@next/swc-linux-x64-musl': 13.1.5 + '@next/swc-win32-arm64-msvc': 13.1.5 + '@next/swc-win32-ia32-msvc': 13.1.5 + '@next/swc-win32-x64-msvc': 13.1.5 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -5656,6 +5714,10 @@ packages: resolution: {integrity: sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==} dev: true + /postcss-value-parser/4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + dev: false + /postcss-values-parser/2.0.1: resolution: {integrity: sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg==} engines: {node: '>=6.14.4'} @@ -6325,6 +6387,19 @@ packages: source-map-js: 1.0.2 dev: true + /satori/0.0.46: + resolution: {integrity: sha512-7RfTz38MB0n8tzmRHtUh1y0K7609CLBHpYuyZuh9rpf9FyhOd2in+6EHuqu6ul/Jebn1qD1HdYKtAMjb7uiNAQ==} + engines: {node: '>=16'} + dependencies: + '@shuding/opentype.js': 1.4.0-beta.0 + css-background-parser: 0.1.0 + css-box-shadow: 1.0.0-3 + css-to-react-native: 3.1.0 + emoji-regex: 10.2.1 + postcss-value-parser: 4.2.0 + yoga-wasm-web: 0.3.0 + dev: false + /sax/1.2.4: resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==} dev: true @@ -6498,6 +6573,10 @@ packages: strip-ansi: 6.0.1 dev: false + /string.prototype.codepointat/0.2.1: + resolution: {integrity: sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==} + dev: false + /string.prototype.matchall/4.0.8: resolution: {integrity: sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==} dependencies: @@ -7261,6 +7340,10 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + /yoga-wasm-web/0.3.0: + resolution: {integrity: sha512-rD3L4jyMlO1m+RWU60lNwZQK5zmzglCV5fI1gTRikmpv3YzmNIZQbjyfE6cMNb9Xaly/C1SwemYGbsiOekMvnQ==} + dev: false + /zwitch/2.0.2: resolution: {integrity: sha512-JZxotl7SxAJH0j7dN4pxsTV6ZLXoLdGME+PsjkL/DaBrVryK9kTGq06GfKrwcSOqypP+fdXGoCHE36b99fWVoA==} dev: false diff --git a/public/assets/logo-optimized.svg b/public/assets/logo-optimized.svg deleted file mode 100644 index 8963dd9..0000000 --- a/public/assets/logo-optimized.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/assets/logo.svg b/public/assets/logo.svg index f64a629..8963dd9 100644 --- a/public/assets/logo.svg +++ b/public/assets/logo.svg @@ -1,124 +1,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/app/page.tsx b/src/app/page.tsx index cc19b1d..5aefbb5 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -48,7 +48,7 @@ export default async function Page() { style={{ display: "flex", flexDirection: "row", alignItems: "center" }} > { } // TODO: improve `key` type - const throwIfUndefined = (key: keyof Environment): string => { + const throwIfUndefined = ( + key: keyof Environment, + justWarn?: boolean + ): string => { const value = env[key] if (value === undefined) { - throw new Error(`Missing environment variable: ${key}`) + if (justWarn) { + console.warn( + `${key} is missing, but is expected. \n This can occur when building when a database is not yet available.` + ) + return "" + } else { + throw new Error(`Missing environment variable: ${key}`) + } } return value diff --git a/src/pages/api/health.ts b/src/pages/api/health.ts deleted file mode 100644 index 7200f94..0000000 --- a/src/pages/api/health.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { withMethods } from "@lib/api-middleware/with-methods" -import { NextApiRequest, NextApiResponse } from "next" - -const handler = async (_: NextApiRequest, res: NextApiResponse) => { - return res.json({ - status: "UP" - }) -} - -export default withMethods(["GET"], handler) diff --git a/src/pages/api/og.tsx b/src/pages/api/og.tsx new file mode 100644 index 0000000..8f20190 --- /dev/null +++ b/src/pages/api/og.tsx @@ -0,0 +1,146 @@ +/* eslint-disable jsx-a11y/alt-text */ +/* eslint-disable @next/next/no-img-element */ +import { ImageResponse } from "@vercel/og" +import { NextRequest } from "next/server" + +const WIDTH = 1200 +const HEIGHT = 630 +function Logo() { + // from public/assets/logo.svg + return ( + + + + + + + + + + + + + + + + + + + ) +} +export default async function handler(req: NextRequest) { + const url = new URL(req.url) + const title = url.searchParams.get("title") || "A Drift post" + const description = url.searchParams.get("description") || "" + const date = url.searchParams.get("date") || new Date().toISOString() + const numFiles = url.searchParams.get("numFiles") || "0" + + // ... + return new ImageResponse( + ( + + + + + + + + {" "} + {title}{" "} + + + {" "} + {description}{" "} + + + {numFiles} files posted on {new Date(date).toLocaleDateString()}{" "} + at {new Date(date).toLocaleTimeString()} + + + + + ), + { + width: WIDTH, + height: HEIGHT, + // debug: true + } + ) +} + +export const config = { + runtime: "edge" +}
+ {" "} + {description}{" "} +
+ {numFiles} files posted on {new Date(date).toLocaleDateString()}{" "} + at {new Date(date).toLocaleTimeString()} +