diff --git a/components/ChooseTemplates.tsx b/components/ChooseTemplates.tsx index e5dfb54..5bd1a96 100644 --- a/components/ChooseTemplates.tsx +++ b/components/ChooseTemplates.tsx @@ -27,6 +27,7 @@ const ChooseTemplates = ({ myResumes = false }: { myResumes?: boolean }) => { const createUserResume = useMutation(api.resume.createUserResume); const router = useRouter(); const templates = useQuery(api.resume.getTemplates); + console.log(templates) const myResumeTemplates = useQuery(api.resume.getUserResumes, { userId: user?.id || "", }); diff --git a/convex/auth.config.ts b/convex/auth.config.ts index e712076..1656485 100644 --- a/convex/auth.config.ts +++ b/convex/auth.config.ts @@ -1,8 +1,10 @@ export default { providers: [ { - domain: "https://sound-crab-61.clerk.accounts.dev/", + domain: "https://rested-albacore-8.clerk.accounts.dev", applicationID: "convex", }, ] - }; \ No newline at end of file + }; + + /* */ \ No newline at end of file diff --git a/convex/resume.ts b/convex/resume.ts index 8f486ce..416dbe6 100644 --- a/convex/resume.ts +++ b/convex/resume.ts @@ -55,6 +55,7 @@ export const updateHeader = mutation({ throw new Error("Something went wrong"); } + const identity = await ctx.auth.getUserIdentity(); if (!identity) { throw new Error("Not authenticated"); @@ -150,7 +151,7 @@ export const updateExperience = mutation({ if (!resume) { throw new Error("Something went wrong"); } - + const identity = await ctx.auth.getUserIdentity(); if (!identity) { throw new Error("Not authenticated"); diff --git a/middleware.ts b/middleware.ts new file mode 100644 index 0000000..758344b --- /dev/null +++ b/middleware.ts @@ -0,0 +1,12 @@ +import { clerkMiddleware } from '@clerk/nextjs/server' + +export default clerkMiddleware() + +export const config = { + matcher: [ + // Skip Next.js internals and all static files, unless found in search params + '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)', + // Always run for API routes + '/(api|trpc)(.*)', + ], +} \ No newline at end of file diff --git a/next.config.mjs b/next.config.mjs index 4678774..2227314 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,11 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + typescript: { + ignoreBuildErrors: true, + }, + eslint: { + ignoreDuringBuilds: true, + }, +}; export default nextConfig; diff --git a/package-lock.json b/package-lock.json index 4426a1b..be3da46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "resume-craft", "version": "0.1.0", "dependencies": { - "@clerk/nextjs": "^5.1.6", + "@clerk/nextjs": "^5.7.5", "@google/generative-ai": "^0.14.0", "@radix-ui/react-checkbox": "^1.1.1", "@radix-ui/react-dialog": "^1.1.1", @@ -202,14 +202,13 @@ } }, "node_modules/@clerk/backend": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-1.2.4.tgz", - "integrity": "sha512-H6K1kHPaDFM6pBdwDAHh1jWSZxCWhGPzDmqgc7LByjqKS6RZUf3cs5mJkIXyopUpHY7wvwj50vSF0xJ46MEzNA==", - "license": "MIT", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-1.14.1.tgz", + "integrity": "sha512-YlKMpiVo4UITw3sgA+9QrAFRILVOz5hgB1Zw180Y2LEZ5a+MdpX668vJKGh7riSweMN7JQvU2jlsKGRO+1bXDw==", "dependencies": { - "@clerk/shared": "2.3.1", - "@clerk/types": "4.6.1", - "cookie": "0.5.0", + "@clerk/shared": "2.9.2", + "@clerk/types": "4.26.0", + "cookie": "0.7.0", "snakecase-keys": "5.4.4", "tslib": "2.4.1" }, @@ -220,17 +219,15 @@ "node_modules/@clerk/backend/node_modules/tslib": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "license": "0BSD" + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" }, "node_modules/@clerk/clerk-react": { - "version": "5.2.5", - "resolved": "https://registry.npmjs.org/@clerk/clerk-react/-/clerk-react-5.2.5.tgz", - "integrity": "sha512-Ihf1t2LdWTagW3U5BH5KRwQ8i+ECaZGEUymhJ89eZA+Ux5iXwLfOIBdwCIs45gbVuFiQ8WK0W00eaDgsNaf1mw==", - "license": "MIT", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@clerk/clerk-react/-/clerk-react-5.12.0.tgz", + "integrity": "sha512-3Lr2QazCm5R6ZLbu7wM+d5YwCElrAoX00OBWcKqjPYaWDJCCmEYN6LJbLzOTYQ8QT1J1ZIed85/lKa+q2aD1aA==", "dependencies": { - "@clerk/shared": "2.3.1", - "@clerk/types": "4.6.1", + "@clerk/shared": "2.9.2", + "@clerk/types": "4.26.0", "tslib": "2.4.1" }, "engines": { @@ -248,17 +245,16 @@ "license": "0BSD" }, "node_modules/@clerk/nextjs": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/@clerk/nextjs/-/nextjs-5.1.6.tgz", - "integrity": "sha512-HAxDzvVJ6EM99NbxNYOvMfGSSFEXyz+yPo1ER7RoV95sTH61PZ4ugsg+Ml0AhjQ60j3xUU/BPhQEYogGxvQzEA==", - "license": "MIT", - "dependencies": { - "@clerk/backend": "1.2.4", - "@clerk/clerk-react": "5.2.5", - "@clerk/shared": "2.3.1", - "@clerk/types": "4.6.1", + "version": "5.7.5", + "resolved": "https://registry.npmjs.org/@clerk/nextjs/-/nextjs-5.7.5.tgz", + "integrity": "sha512-hfH4IiKcDT9LlqSOlNHZoYfX6iF4lBqPXf/KwnILCX/0+MVYaotb30FwWXkcHI2jZgcvumlQTOq8Gv5KugnihA==", + "dependencies": { + "@clerk/backend": "1.14.1", + "@clerk/clerk-react": "5.12.0", + "@clerk/shared": "2.9.2", + "@clerk/types": "4.26.0", "crypto-js": "4.2.0", - "path-to-regexp": "6.2.2", + "server-only": "0.0.1", "tslib": "2.4.1" }, "engines": { @@ -277,13 +273,12 @@ "license": "0BSD" }, "node_modules/@clerk/shared": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@clerk/shared/-/shared-2.3.1.tgz", - "integrity": "sha512-WX7cCViYqkNMnbFfT2B93ykNcSseoYM1obMUynO60VBl9Zi6Epde5tn9VRamhuOdojgPR+DyYkH9AzBpXFYnSg==", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@clerk/shared/-/shared-2.9.2.tgz", + "integrity": "sha512-vRMDj13Pv9n8Pf+f8P40AvqJ8QEq348qUxUVIf17vn9R3/toicrQOY/Q6qsrAS8KXY9+ZnyTafJa+VFK+6iEFA==", "hasInstallScript": true, - "license": "MIT", "dependencies": { - "@clerk/types": "4.6.1", + "@clerk/types": "4.26.0", "glob-to-regexp": "0.4.1", "js-cookie": "3.0.5", "std-env": "^3.7.0", @@ -306,10 +301,9 @@ } }, "node_modules/@clerk/types": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@clerk/types/-/types-4.6.1.tgz", - "integrity": "sha512-QFeNKPYDmTJ88l5QYG0SPwbABk42wRMalW3M/wAtr+wnQxBCXyX2XRZe9h4g2rH1VF+wG4Xe56abeeD+xE4iEw==", - "license": "MIT", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@clerk/types/-/types-4.26.0.tgz", + "integrity": "sha512-VGcrQz/XpCiGbpIIzKVwWw4nLorzKnIP1IAemj1xt/80ULcdEZCncwhas6PoYBBsl1W55A1SwP9B/pEs0nmkCw==", "dependencies": { "csstype": "3.1.1" }, @@ -320,8 +314,7 @@ "node_modules/@clerk/types/node_modules/csstype": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", - "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==", - "license": "MIT" + "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" }, "node_modules/@esbuild/android-arm": { "version": "0.17.19", @@ -3077,10 +3070,9 @@ } }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "license": "MIT", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.0.tgz", + "integrity": "sha512-qCf+V4dtlNhSRXGAZatc1TasyFO6GjohcOul807YOb5ik3+kQSnb4d7iajeCL8QHaJ4uZEjCgiCJerKXwdRVlQ==", "engines": { "node": ">= 0.6" } @@ -3364,7 +3356,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", - "license": "MIT", "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" @@ -4667,8 +4658,7 @@ "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "license": "BSD-2-Clause" + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" }, "node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", @@ -5499,7 +5489,6 @@ "version": "3.0.5", "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", - "license": "MIT", "engines": { "node": ">=14" } @@ -5728,7 +5717,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "license": "MIT", "dependencies": { "tslib": "^2.0.3" } @@ -5776,7 +5764,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "license": "MIT", "engines": { "node": ">=8" }, @@ -6044,7 +6031,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "license": "MIT", "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" @@ -6437,12 +6423,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-to-regexp": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", - "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", - "license": "MIT" - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -7597,7 +7577,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", - "license": "MIT", "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" @@ -7607,7 +7586,6 @@ "version": "5.4.4", "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-5.4.4.tgz", "integrity": "sha512-YTywJG93yxwHLgrYLZjlC75moVEX04LZM4FHfihjHe1FCXm+QaLOFfSf535aXOAd0ArVQMWUAe8ZPm4VtWyXaA==", - "license": "MIT", "dependencies": { "map-obj": "^4.1.0", "snake-case": "^3.0.4", @@ -7621,7 +7599,6 @@ "version": "2.19.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=12.20" }, @@ -7676,10 +7653,9 @@ "license": "BSD-3-Clause" }, "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", - "license": "MIT" + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==" }, "node_modules/stop-iteration-iterator": { "version": "1.0.0", @@ -7994,7 +7970,6 @@ "version": "2.2.5", "resolved": "https://registry.npmjs.org/swr/-/swr-2.2.5.tgz", "integrity": "sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==", - "license": "MIT", "dependencies": { "client-only": "^0.0.1", "use-sync-external-store": "^1.2.0" @@ -8434,7 +8409,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==", - "license": "MIT", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } diff --git a/package.json b/package.json index 811b8d3..b63e4a1 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@clerk/nextjs": "^5.1.6", + "@clerk/nextjs": "^5.7.5", "@google/generative-ai": "^0.14.0", "@radix-ui/react-checkbox": "^1.1.1", "@radix-ui/react-dialog": "^1.1.1",