diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 1c3b86b..9ab5773 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,8 +1,19 @@ module.exports = { root: true, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:svelte/recommended', + 'prettier' + ], parser: '@typescript-eslint/parser', - extends: ['plugin:svelte/recommended'], plugins: ['@typescript-eslint'], + parserOptions: { + sourceType: 'module', + ecmaVersion: 2020, + project: './tsconfig.json', + extraFileExtensions: ['.svelte'] // This is a required setting in `@typescript-eslint/parser` v4.24.0. + }, ignorePatterns: ['*.cjs'], overrides: [ { @@ -14,15 +25,6 @@ module.exports = { } } ], - settings: { - 'svelte3/typescript': () => require('typescript') - }, - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020, - project: './tsconfig.json', - extraFileExtensions: ['.svelte'] // This is a required setting in `@typescript-eslint/parser` v4.24.0. - }, env: { browser: true, es2017: true, diff --git a/package.json b/package.json index fb65082..d4389d7 100644 --- a/package.json +++ b/package.json @@ -27,15 +27,16 @@ }, "devDependencies": { "@melt-ui/pp": "^0.1.4", + "@melt-ui/svelte": "^0.57.3", "@playwright/test": "^1.40.1", "@resvg/resvg-js": "^2.4.1", "@sveltejs/adapter-auto": "^2.1.1", "@sveltejs/adapter-vercel": "^3.1.0", - "@sveltejs/kit": "^1.27.6", + "@sveltejs/kit": "^1.30.3", "@types/cookie": "^0.5.4", - "@types/node": "^18.19.2", - "@typescript-eslint/eslint-plugin": "^6.13.2", - "@typescript-eslint/parser": "^6.13.2", + "@types/node": "^18.19.3", + "@typescript-eslint/eslint-plugin": "^6.14.0", + "@typescript-eslint/parser": "^6.14.0", "autoprefixer": "^10.4.15", "eslint": "^8.55.0", "eslint-config-prettier": "^9.1.0", @@ -46,23 +47,23 @@ "postcss-import": "^15.1.0", "postcss-load-config": "^4.0.2", "postcss-preset-env": "^9.3.0", - "prettier": "^3.1.0", + "prettier": "^3.1.1", "prettier-plugin-svelte": "^3.1.2", - "prisma": "^5.6.0", + "prisma": "^5.7.0", "sass": "^1.65.1", "satori": "^0.10.11", "satori-html": "^0.3.2", "svelte": "^4.2.8", "svelte-check": "^3.6.2", "svelte-meta-tags": "^3.1.0", - "svelte-preprocess": "^5.1.1", + "svelte-preprocess": "^5.1.2", "svelte-sequential-preprocessor": "^2.0.1", "sveltekit-flash-message": "^2.2.2", - "sveltekit-superforms": "^1.11.0", + "sveltekit-superforms": "^1.12.0", "tailwindcss": "^3.3.6", - "ts-node": "^10.9.1", + "ts-node": "^10.9.2", "tslib": "^2.6.1", - "typescript": "^5.3.2", + "typescript": "^5.3.3", "vite": "^4.5.1", "vitest": "^0.34.6", "zod": "^3.22.4" @@ -76,13 +77,11 @@ "@fontsource/fira-mono": "^4.5.10", "@iconify-icons/line-md": "^1.2.26", "@iconify-icons/mdi": "^1.2.47", - "@lucia-auth/adapter-mysql": "^2.1.0", - "@lucia-auth/adapter-prisma": "^3.0.2", + "@lucia-auth/adapter-prisma": "4.0.0-beta.7", "@lukeed/uuid": "^2.0.1", - "@melt-ui/svelte": "^0.57.3", "@paralleldrive/cuid2": "^2.2.2", - "@prisma/client": "^5.6.0", - "@sentry/sveltekit": "^7.85.0", + "@prisma/client": "^5.7.0", + "@sentry/sveltekit": "^7.88.0", "@types/feather-icons": "^4.29.4", "@vercel/og": "^0.5.13", "bits-ui": "^0.0.27", @@ -96,15 +95,16 @@ "iconify-icon": "^1.0.8", "just-kebab-case": "^4.2.0", "loader": "^2.1.1", - "lucia": "^2.7.4", + "lucia": "3.0.0-beta.12", "lucide-svelte": "^0.256.1", - "open-props": "^1.6.13", + "open-props": "^1.6.16", + "oslo": "^0.24.0", "radix-svelte": "^0.9.0", "svelte-french-toast": "^1.2.0", "svelte-lazy-loader": "^1.0.0", "tailwind-merge": "^1.14.0", "tailwind-variants": "^0.1.18", "tailwindcss-animate": "^1.0.6", - "zod-to-json-schema": "^3.22.1" + "zod-to-json-schema": "^3.22.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7d12e77..ce23ba6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,27 +14,21 @@ dependencies: '@iconify-icons/mdi': specifier: ^1.2.47 version: 1.2.48 - '@lucia-auth/adapter-mysql': - specifier: ^2.1.0 - version: 2.1.0(lucia@2.7.4) '@lucia-auth/adapter-prisma': - specifier: ^3.0.2 - version: 3.0.2(@prisma/client@5.6.0)(lucia@2.7.4) + specifier: 4.0.0-beta.7 + version: 4.0.0-beta.7(@prisma/client@5.7.0)(lucia@3.0.0-beta.12) '@lukeed/uuid': specifier: ^2.0.1 version: 2.0.1 - '@melt-ui/svelte': - specifier: ^0.57.3 - version: 0.57.3(svelte@4.2.8) '@paralleldrive/cuid2': specifier: ^2.2.2 version: 2.2.2 '@prisma/client': - specifier: ^5.6.0 - version: 5.6.0(prisma@5.6.0) + specifier: ^5.7.0 + version: 5.7.0(prisma@5.7.0) '@sentry/sveltekit': - specifier: ^7.85.0 - version: 7.85.0(@sveltejs/kit@1.27.6)(svelte@4.2.8) + specifier: ^7.88.0 + version: 7.88.0(@sveltejs/kit@1.30.3)(svelte@4.2.8) '@types/feather-icons': specifier: ^4.29.4 version: 4.29.4 @@ -43,7 +37,7 @@ dependencies: version: 0.5.20 bits-ui: specifier: ^0.0.27 - version: 0.0.27(@sveltejs/kit@1.27.6)(svelte@4.2.8) + version: 0.0.27(@sveltejs/kit@1.30.3)(svelte@4.2.8) boardgamegeekclient: specifier: ^1.9.1 version: 1.9.1 @@ -61,7 +55,7 @@ dependencies: version: 4.29.1 formsnap: specifier: ^0.0.9 - version: 0.0.9(svelte@4.2.8)(sveltekit-superforms@1.11.0)(zod@3.22.4) + version: 0.0.9(svelte@4.2.8)(sveltekit-superforms@1.12.0)(zod@3.22.4) html-entities: specifier: ^2.4.0 version: 2.4.0 @@ -75,14 +69,17 @@ dependencies: specifier: ^2.1.1 version: 2.1.1 lucia: - specifier: ^2.7.4 - version: 2.7.4 + specifier: 3.0.0-beta.12 + version: 3.0.0-beta.12 lucide-svelte: specifier: ^0.256.1 version: 0.256.1(svelte@4.2.8) open-props: - specifier: ^1.6.13 - version: 1.6.13 + specifier: ^1.6.16 + version: 1.6.16 + oslo: + specifier: ^0.24.0 + version: 0.24.0 radix-svelte: specifier: ^0.9.0 version: 0.9.0(svelte@4.2.8) @@ -102,13 +99,16 @@ dependencies: specifier: ^1.0.6 version: 1.0.7(tailwindcss@3.3.6) zod-to-json-schema: - specifier: ^3.22.1 - version: 3.22.1(zod@3.22.4) + specifier: ^3.22.3 + version: 3.22.3(zod@3.22.4) devDependencies: '@melt-ui/pp': specifier: ^0.1.4 version: 0.1.4(@melt-ui/svelte@0.57.3)(svelte@4.2.8) + '@melt-ui/svelte': + specifier: ^0.57.3 + version: 0.57.3(svelte@4.2.8) '@playwright/test': specifier: ^1.40.1 version: 1.40.1 @@ -117,25 +117,25 @@ devDependencies: version: 2.6.0 '@sveltejs/adapter-auto': specifier: ^2.1.1 - version: 2.1.1(@sveltejs/kit@1.27.6) + version: 2.1.1(@sveltejs/kit@1.30.3) '@sveltejs/adapter-vercel': specifier: ^3.1.0 - version: 3.1.0(@sveltejs/kit@1.27.6) + version: 3.1.0(@sveltejs/kit@1.30.3) '@sveltejs/kit': - specifier: ^1.27.6 - version: 1.27.6(svelte@4.2.8)(vite@4.5.1) + specifier: ^1.30.3 + version: 1.30.3(svelte@4.2.8)(vite@4.5.1) '@types/cookie': specifier: ^0.5.4 version: 0.5.4 '@types/node': - specifier: ^18.19.2 - version: 18.19.2 + specifier: ^18.19.3 + version: 18.19.3 '@typescript-eslint/eslint-plugin': - specifier: ^6.13.2 - version: 6.13.2(@typescript-eslint/parser@6.13.2)(eslint@8.55.0)(typescript@5.3.2) + specifier: ^6.14.0 + version: 6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.55.0)(typescript@5.3.3) '@typescript-eslint/parser': - specifier: ^6.13.2 - version: 6.13.2(eslint@8.55.0)(typescript@5.3.2) + specifier: ^6.14.0 + version: 6.14.0(eslint@8.55.0)(typescript@5.3.3) autoprefixer: specifier: ^10.4.15 version: 10.4.16(postcss@8.4.32) @@ -147,7 +147,7 @@ devDependencies: version: 9.1.0(eslint@8.55.0) eslint-plugin-svelte: specifier: ^2.35.1 - version: 2.35.1(eslint@8.55.0)(svelte@4.2.8)(ts-node@10.9.1) + version: 2.35.1(eslint@8.55.0)(svelte@4.2.8)(ts-node@10.9.2) just-clone: specifier: ^6.2.0 version: 6.2.0 @@ -162,19 +162,19 @@ devDependencies: version: 15.1.0(postcss@8.4.32) postcss-load-config: specifier: ^4.0.2 - version: 4.0.2(postcss@8.4.32)(ts-node@10.9.1) + version: 4.0.2(postcss@8.4.32)(ts-node@10.9.2) postcss-preset-env: specifier: ^9.3.0 version: 9.3.0(postcss@8.4.32) prettier: - specifier: ^3.1.0 - version: 3.1.0 + specifier: ^3.1.1 + version: 3.1.1 prettier-plugin-svelte: specifier: ^3.1.2 - version: 3.1.2(prettier@3.1.0)(svelte@4.2.8) + version: 3.1.2(prettier@3.1.1)(svelte@4.2.8) prisma: - specifier: ^5.6.0 - version: 5.6.0 + specifier: ^5.7.0 + version: 5.7.0 sass: specifier: ^1.65.1 version: 1.69.5 @@ -192,34 +192,34 @@ devDependencies: version: 3.6.2(postcss-load-config@4.0.2)(postcss@8.4.32)(sass@1.69.5)(svelte@4.2.8) svelte-meta-tags: specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.8)(typescript@5.3.2) + version: 3.1.0(svelte@4.2.8)(typescript@5.3.3) svelte-preprocess: - specifier: ^5.1.1 - version: 5.1.1(postcss-load-config@4.0.2)(postcss@8.4.32)(sass@1.69.5)(svelte@4.2.8)(typescript@5.3.2) + specifier: ^5.1.2 + version: 5.1.2(postcss-load-config@4.0.2)(postcss@8.4.32)(sass@1.69.5)(svelte@4.2.8)(typescript@5.3.3) svelte-sequential-preprocessor: specifier: ^2.0.1 version: 2.0.1 sveltekit-flash-message: specifier: ^2.2.2 - version: 2.2.2(@sveltejs/kit@1.27.6)(svelte@4.2.8) + version: 2.2.2(@sveltejs/kit@1.30.3)(svelte@4.2.8) sveltekit-superforms: - specifier: ^1.11.0 - version: 1.11.0(@sveltejs/kit@1.27.6)(svelte@4.2.8)(zod@3.22.4) + specifier: ^1.12.0 + version: 1.12.0(@sveltejs/kit@1.30.3)(svelte@4.2.8)(zod@3.22.4) tailwindcss: specifier: ^3.3.6 - version: 3.3.6(ts-node@10.9.1) + version: 3.3.6(ts-node@10.9.2) ts-node: - specifier: ^10.9.1 - version: 10.9.1(@types/node@18.19.2)(typescript@5.3.2) + specifier: ^10.9.2 + version: 10.9.2(@types/node@18.19.3)(typescript@5.3.3) tslib: specifier: ^2.6.1 version: 2.6.2 typescript: - specifier: ^5.3.2 - version: 5.3.2 + specifier: ^5.3.3 + version: 5.3.3 vite: specifier: ^4.5.1 - version: 4.5.1(@types/node@18.19.2)(sass@1.69.5) + version: 4.5.1(@types/node@18.19.3)(sass@1.69.5) vitest: specifier: ^0.34.6 version: 0.34.6(sass@1.69.5) @@ -970,29 +970,14 @@ packages: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 - /@lucia-auth/adapter-mysql@2.1.0(lucia@2.7.4): - resolution: {integrity: sha512-LkqsJHQS9KuMs+cTJQJnaqb6obqMyJfblyyLM0Ogoimzikb5orbkWI0C8eY3Supr60bgP4PYuQxYZm8xxera0Q==} - peerDependencies: - '@planetscale/database': ^1.0.0 - lucia: ^2.0.0 - mysql2: ^3.0.0 - peerDependenciesMeta: - '@planetscale/database': - optional: true - mysql2: - optional: true - dependencies: - lucia: 2.7.4 - dev: false - - /@lucia-auth/adapter-prisma@3.0.2(@prisma/client@5.6.0)(lucia@2.7.4): - resolution: {integrity: sha512-EyJWZene1/zasPwPctv8wwNErZt5mwwm5JATbhg+kXr3R8pbC7lJfVzDTAeeFClVH5k/FywRcsBl3JkPaNIcow==} + /@lucia-auth/adapter-prisma@4.0.0-beta.7(@prisma/client@5.7.0)(lucia@3.0.0-beta.12): + resolution: {integrity: sha512-iC7xy5wylgzmpQtJwxnshGTx4OTxmPc1yKJcTrp7FnWPSOg6ehvTw2fYBbKb+sHEe8nKVBhQbfAV44ChonPiHQ==} peerDependencies: '@prisma/client': ^4.2.0 || ^5.0.0 - lucia: ^2.0.0 + lucia: 3.0.0-beta.12 dependencies: - '@prisma/client': 5.6.0(prisma@5.6.0) - lucia: 2.7.4 + '@prisma/client': 5.7.0(prisma@5.7.0) + lucia: 3.0.0-beta.12 dev: false /@lukeed/csprng@1.1.0: @@ -1059,12 +1044,285 @@ packages: focus-trap: 7.5.4 nanoid: 4.0.2 svelte: 4.2.8 + dev: true /@noble/hashes@1.3.2: resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} dev: false + /@node-rs/argon2-android-arm-eabi@1.5.2: + resolution: {integrity: sha512-vVZec4ITr9GumAy0p8Zj8ozie362gtbZrTkLp9EqvuFZ/HrZzR09uS2IsDgm4mAstg/rc4A1gLRrHI8jDdbjkA==} + engines: {node: '>= 10'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-android-arm64@1.5.2: + resolution: {integrity: sha512-SwhnsXyrpgtWDTwYds1WUnxLA/kVP8HVaImYwQ3Wemqj1lkzcSoIaNyjNWkyrYGqO1tVc1YUrqsbd5eCHh+3sg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-darwin-arm64@1.5.2: + resolution: {integrity: sha512-+1ZMKiCCv2pip/o1Xg09piQru2LOIBPQ1vS4is86f55N3jjZnSfP+db5mYCSRuB0gRYqui98he7su7OGXlF4gQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-darwin-x64@1.5.2: + resolution: {integrity: sha512-mQ57mORlsxpfjcEsVpiHyHCOp6Ljrz/rVNWk8ihnPWw0qt0EqF1zbHRxTEPemL1iBHL9UyXpXrKS4JKq6xMn5w==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-freebsd-x64@1.5.2: + resolution: {integrity: sha512-UjKbFd3viYcpiwflkU4haEdNUMk1V2fVCJImWLWQns/hVval9BrDv5xsBwgdynbPHDlPOiWj816LBQwhWLGVWA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-linux-arm-gnueabihf@1.5.2: + resolution: {integrity: sha512-36GJjJBnVuscV9CTn8RVDeJysnmIzr6Lp7QBCDczYHi6eKFuA8udCJb4SRyJqdvIuzycKG1RL56FbcFBJYCYIA==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-linux-arm64-gnu@1.5.2: + resolution: {integrity: sha512-sE0ydb2gp6xC+5vbVz8l3paaiBbFQIB2Rwp5wx9MmKiYdTfcO5WkGeADuSgoFiTcSEz1RsHXqrdVy6j/LtSqtA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-linux-arm64-musl@1.5.2: + resolution: {integrity: sha512-LhE0YHB0aJCwlbsQrwePik/KFWUc9qMriJIL5KiejK3bDoTVY4ihH587QT56JyaLvl3nBJaAV8l5yMqQdHnouA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-linux-x64-gnu@1.5.2: + resolution: {integrity: sha512-MnKLiBlyg05pxvKXe3lNgBL9El9ThD74hvVEiWH1Xk40RRrJ507NCOWXVmQ0FDq1mjTeGFxbIvk+AcoF0NSLIQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-linux-x64-musl@1.5.2: + resolution: {integrity: sha512-tzLgASY0Ng2OTW7Awwl9UWzjbWx8/uD6gXcZ/k/nYGSZE5Xp8EOD2NUqHLbK6KZE3775A0R25ShpiSxCadYqkg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-win32-arm64-msvc@1.5.2: + resolution: {integrity: sha512-vpTwSvv3oUXTpWZh0/HxdJ5wFMlmS7aVDwL4ATWepTZhMG4n+TO0+tVLdcPHCbg0oc6hCWBjWNPlSn9mW+YIgA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-win32-ia32-msvc@1.5.2: + resolution: {integrity: sha512-KPpZR15ui7uQWQXKmtaKyUQRs4UJdXnIIfiyFLGmLWCdEKlr3MtIGFt0fdziu4BF5ZObD8Ic6QvT0VXK4OJiww==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2-win32-x64-msvc@1.5.2: + resolution: {integrity: sha512-/pGuwixJS8ZlpwhX9iM6g6JEeZYo1TtnNf8exwsOi7gxcUoTUfw5it+5GfbY/n+xRBz/DIU4bzUmXmh+7Gh0ug==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@node-rs/argon2@1.5.2: + resolution: {integrity: sha512-qq7wOSsdP2b4rXEapWNmsCjpaTGZWtp9kZmri98GYCDZqN8UJUG5zSue4XtYWWJMWKJVE/hkaIwk+BgN1ZUn0Q==} + engines: {node: '>= 10'} + optionalDependencies: + '@node-rs/argon2-android-arm-eabi': 1.5.2 + '@node-rs/argon2-android-arm64': 1.5.2 + '@node-rs/argon2-darwin-arm64': 1.5.2 + '@node-rs/argon2-darwin-x64': 1.5.2 + '@node-rs/argon2-freebsd-x64': 1.5.2 + '@node-rs/argon2-linux-arm-gnueabihf': 1.5.2 + '@node-rs/argon2-linux-arm64-gnu': 1.5.2 + '@node-rs/argon2-linux-arm64-musl': 1.5.2 + '@node-rs/argon2-linux-x64-gnu': 1.5.2 + '@node-rs/argon2-linux-x64-musl': 1.5.2 + '@node-rs/argon2-win32-arm64-msvc': 1.5.2 + '@node-rs/argon2-win32-ia32-msvc': 1.5.2 + '@node-rs/argon2-win32-x64-msvc': 1.5.2 + dev: false + + /@node-rs/bcrypt-android-arm-eabi@1.7.3: + resolution: {integrity: sha512-l53RuBqnqNvBN2jx09Ws6jpLmuQdSDx10n0GeaTfwh1svxsC8bPpVmxkfBExsT2Tu7KF38gTnPZvwsxysZQyPQ==} + engines: {node: '>= 10'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-android-arm64@1.7.3: + resolution: {integrity: sha512-TZpm4VbiViqDMvusrcYzLr1b1M5FDF0cDNiTUciLeBSsKtU5lNdEZGAU7gvCnrKoUWpGuOblHU7613zuB7SiNQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-darwin-arm64@1.7.3: + resolution: {integrity: sha512-SiUuAabynVsmixZMjh5xrn8w47EnV0HzbW9st4DPoVhn/wzdUcksIXDY75aoQG2EIzKLN8IGb+CIVnPGmRyhxw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-darwin-x64@1.7.3: + resolution: {integrity: sha512-R+81Z0eX4hZPvCXY5Z6l0l+JrTU3WcSYGHP0QYV9uwdaafOz6EhrCXUzZ02AIcAbNoVR8eucYVruq9PiasXoVw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-freebsd-x64@1.7.3: + resolution: {integrity: sha512-0pItU/5K3e83JjcJj9fZv+78txUoZ3hHCT7n/UMdu9mkpUzhX/rqb4jmQpJpD+UQoR76xp3qDo5RMgQBffBVNg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-linux-arm-gnueabihf@1.7.3: + resolution: {integrity: sha512-HTSybWUjNe8rWuXkTkMeFDiQNHc6VioRcgv6AeHZphIxiT6dFbnhXNkfz4Hr0zxvyPhZ3NrYjT2AmPVFT6VW3Q==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-linux-arm64-gnu@1.7.3: + resolution: {integrity: sha512-rWep6Y+v/c4bZHaM8LmSsrMwMmDR9wG4/q+3Z9VzR8xdnt5VCbuQdYWpf3sgGRGjTRdTBAdSK8x1reOjqsJ3Jg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-linux-arm64-musl@1.7.3: + resolution: {integrity: sha512-TyWEKhxr+yfGcMKzVV/ARZw+Hrky2yl91bo0XYU2ZW6I6LDC0emNsXugdWjwz8ADI4OWhhrOjXD8GCilxiB2Rg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-linux-x64-gnu@1.7.3: + resolution: {integrity: sha512-PofxM1Qg7tZKj1oP0I7tBTSSLr8Xc2uxx+P3pBCPmYzaBwWqGteNHJlF7n2q5xiH7YOlguH4w5CmcEjsiA3K4A==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-linux-x64-musl@1.7.3: + resolution: {integrity: sha512-D5V6/dDVKP8S/ieDBLGhTn4oTo3upbrpWInynbhOMjJvPiIxVG1PiI3MXkWBtG9qtfleDk7gUkEKtAOxlIxDTQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-win32-arm64-msvc@1.7.3: + resolution: {integrity: sha512-b4gH2Yj5R4TwULrfMHd1Qqr+MrnFjVRUAJujDKPqi+PppSqezW8QF6DRSOL4GjnBmz5JEd64wxgeidvy7dsbGw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-win32-ia32-msvc@1.7.3: + resolution: {integrity: sha512-E91ro+ybI0RhNc89aGaZQGll0YhPoHr8JacoWrNKwhg9zwNOYeuO0tokdMZdm6nF0/8obll0Mq7wO9AXO9iffw==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt-win32-x64-msvc@1.7.3: + resolution: {integrity: sha512-LO/p9yjPODj/pQvPnowBuwpDdqiyUXQbqL1xb1RSP3NoyCFAGmjL5h0plSQrhLh8hskQiozBRXNaQurtsM7o0Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@node-rs/bcrypt@1.7.3: + resolution: {integrity: sha512-BF6u9CBPUiyk1zU+5iwikezf+xM4MFSu5cmrrg/PLKffGgIM13ZsY6DHftcTraETB04ryasjM/5IejotH+sO5Q==} + engines: {node: '>= 10'} + optionalDependencies: + '@node-rs/bcrypt-android-arm-eabi': 1.7.3 + '@node-rs/bcrypt-android-arm64': 1.7.3 + '@node-rs/bcrypt-darwin-arm64': 1.7.3 + '@node-rs/bcrypt-darwin-x64': 1.7.3 + '@node-rs/bcrypt-freebsd-x64': 1.7.3 + '@node-rs/bcrypt-linux-arm-gnueabihf': 1.7.3 + '@node-rs/bcrypt-linux-arm64-gnu': 1.7.3 + '@node-rs/bcrypt-linux-arm64-musl': 1.7.3 + '@node-rs/bcrypt-linux-x64-gnu': 1.7.3 + '@node-rs/bcrypt-linux-x64-musl': 1.7.3 + '@node-rs/bcrypt-win32-arm64-msvc': 1.7.3 + '@node-rs/bcrypt-win32-ia32-msvc': 1.7.3 + '@node-rs/bcrypt-win32-x64-msvc': 1.7.3 + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1100,8 +1358,8 @@ packages: /@polka/url@1.0.0-next.23: resolution: {integrity: sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==} - /@prisma/client@5.6.0(prisma@5.6.0): - resolution: {integrity: sha512-mUDefQFa1wWqk4+JhKPYq8BdVoFk9NFMBXUI8jAkBfQTtgx8WPx02U2HB/XbAz3GSUJpeJOKJQtNvaAIDs6sug==} + /@prisma/client@5.7.0(prisma@5.7.0): + resolution: {integrity: sha512-cZmglCrfNbYpzUtz7HscVHl38e9CrUs31nrVoGUK1nIPXGgt8hT4jj2s657UXcNdQ/jBUxDgGmHyu2Nyrq1txg==} engines: {node: '>=16.13'} requiresBuild: true peerDependencies: @@ -1110,17 +1368,35 @@ packages: prisma: optional: true dependencies: - '@prisma/engines-version': 5.6.0-32.e95e739751f42d8ca026f6b910f5a2dc5adeaeee - prisma: 5.6.0 + prisma: 5.7.0 dev: false - /@prisma/engines-version@5.6.0-32.e95e739751f42d8ca026f6b910f5a2dc5adeaeee: - resolution: {integrity: sha512-UoFgbV1awGL/3wXuUK3GDaX2SolqczeeJ5b4FVec9tzeGbSWJboPSbT0psSrmgYAKiKnkOPFSLlH6+b+IyOwAw==} - dev: false + /@prisma/debug@5.7.0: + resolution: {integrity: sha512-tZ+MOjWlVvz1kOEhNYMa4QUGURY+kgOUBqLHYIV8jmCsMuvA1tWcn7qtIMLzYWCbDcQT4ZS8xDgK0R2gl6/0wA==} - /@prisma/engines@5.6.0: - resolution: {integrity: sha512-Mt2q+GNJpU2vFn6kif24oRSBQv1KOkYaterQsi0k2/lA+dLvhRX6Lm26gon6PYHwUM8/h8KRgXIUMU0PCLB6bw==} + /@prisma/engines-version@5.7.0-41.79fb5193cf0a8fdbef536e4b4a159cad677ab1b9: + resolution: {integrity: sha512-V6tgRVi62jRwTm0Hglky3Scwjr/AKFBFtS+MdbsBr7UOuiu1TKLPc6xfPiyEN1+bYqjEtjxwGsHgahcJsd1rNg==} + + /@prisma/engines@5.7.0: + resolution: {integrity: sha512-TkOMgMm60n5YgEKPn9erIvFX2/QuWnl3GBo6yTRyZKk5O5KQertXiNnrYgSLy0SpsKmhovEPQb+D4l0SzyE7XA==} requiresBuild: true + dependencies: + '@prisma/debug': 5.7.0 + '@prisma/engines-version': 5.7.0-41.79fb5193cf0a8fdbef536e4b4a159cad677ab1b9 + '@prisma/fetch-engine': 5.7.0 + '@prisma/get-platform': 5.7.0 + + /@prisma/fetch-engine@5.7.0: + resolution: {integrity: sha512-zIn/qmO+N/3FYe7/L9o+yZseIU8ivh4NdPKSkQRIHfg2QVTVMnbhGoTcecbxfVubeTp+DjcbjS0H9fCuM4W04w==} + dependencies: + '@prisma/debug': 5.7.0 + '@prisma/engines-version': 5.7.0-41.79fb5193cf0a8fdbef536e4b4a159cad677ab1b9 + '@prisma/get-platform': 5.7.0 + + /@prisma/get-platform@5.7.0: + resolution: {integrity: sha512-ZeV/Op4bZsWXuw5Tg05WwRI8BlKiRFhsixPcAM+5BKYSiUZiMKIi713tfT3drBq8+T0E1arNZgYSA9QYcglWNA==} + dependencies: + '@prisma/debug': 5.7.0 /@resvg/resvg-js-android-arm-eabi@2.6.0: resolution: {integrity: sha512-lJnZ/2P5aMocrFMW7HWhVne5gH82I8xH6zsfH75MYr4+/JOaVcGCTEQ06XFohGMdYRP3v05SSPLPvTM/RHjxfA==} @@ -1260,13 +1536,13 @@ packages: estree-walker: 2.0.2 picomatch: 2.3.1 - /@sentry-internal/feedback@7.85.0: - resolution: {integrity: sha512-MlbIN+N8CWFJBjbqMmARe4+UPo9QRhRar0YoOfmNA2Xqk/EwXcjHWkealosHznXH7tqVbjB25QJpHtDystft/Q==} + /@sentry-internal/feedback@7.88.0: + resolution: {integrity: sha512-lbK6jgO1I0M96nZQ99mcLSZ55ebwPAP6LhEWhkmc+eAfy97VpiY+qsbmgsmOzCEPqMmEUCEcI0rEZ7fiye2v2Q==} engines: {node: '>=12'} dependencies: - '@sentry/core': 7.85.0 - '@sentry/types': 7.85.0 - '@sentry/utils': 7.85.0 + '@sentry/core': 7.88.0 + '@sentry/types': 7.88.0 + '@sentry/utils': 7.88.0 dev: false /@sentry-internal/tracing@7.77.0: @@ -1278,25 +1554,25 @@ packages: '@sentry/utils': 7.77.0 dev: false - /@sentry-internal/tracing@7.85.0: - resolution: {integrity: sha512-p3YMUwkPCy2su9cm/3+7QYR4RiMI0+07DU1BZtht9NLTzY2O87/yvUbn1v2yHR3vJQTy/+7N0ud9/mPBFznRQQ==} + /@sentry-internal/tracing@7.88.0: + resolution: {integrity: sha512-xXQdcYhsS+ourzJHjXNjZC9zakuc97udmpgaXRjEP7FjPYclIx+YXwgFBdHM2kzAwZLFOsEce5dr46GVXUDfZw==} engines: {node: '>=8'} dependencies: - '@sentry/core': 7.85.0 - '@sentry/types': 7.85.0 - '@sentry/utils': 7.85.0 + '@sentry/core': 7.88.0 + '@sentry/types': 7.88.0 + '@sentry/utils': 7.88.0 dev: false - /@sentry/browser@7.85.0: - resolution: {integrity: sha512-x4sH7vTQnZQgy1U7NuN8XwhleAw7YMQitccHeC5m+kpIKGUO7w4Mdvu8rD3dnjmVmZvASpnwocAxy57/vCU6Ww==} + /@sentry/browser@7.88.0: + resolution: {integrity: sha512-il4x3PB99nuU/OJQw2RltgYYbo8vtnYoIgneOeEiw4m0ppK1nKkMkd3vDRipGL6E/0i7IUmQfYYy6U10J5Rx+g==} engines: {node: '>=8'} dependencies: - '@sentry-internal/feedback': 7.85.0 - '@sentry-internal/tracing': 7.85.0 - '@sentry/core': 7.85.0 - '@sentry/replay': 7.85.0 - '@sentry/types': 7.85.0 - '@sentry/utils': 7.85.0 + '@sentry-internal/feedback': 7.88.0 + '@sentry-internal/tracing': 7.88.0 + '@sentry/core': 7.88.0 + '@sentry/replay': 7.88.0 + '@sentry/types': 7.88.0 + '@sentry/utils': 7.88.0 dev: false /@sentry/bundler-plugin-core@0.6.1: @@ -1304,7 +1580,7 @@ packages: engines: {node: '>= 10'} dependencies: '@sentry/cli': 2.21.2 - '@sentry/node': 7.85.0 + '@sentry/node': 7.88.0 '@sentry/tracing': 7.77.0 find-up: 5.0.0 glob: 9.3.2 @@ -1340,75 +1616,75 @@ packages: '@sentry/utils': 7.77.0 dev: false - /@sentry/core@7.85.0: - resolution: {integrity: sha512-DFDAc4tWmHN5IWhr7XbHCiyF1Xgb95jz8Uj/JTX9atlgodId1UIbER77qpEmH3eQGid/QBdqrlR98zCixgSbwg==} + /@sentry/core@7.88.0: + resolution: {integrity: sha512-Jzbb7dcwiCO7kI0a1w+32UzWxbEn2OcZWzp55QMEeAh6nZ/5CXhXwpuHi0tW7doPj+cJdmxMTMu9LqMVfdGkzQ==} engines: {node: '>=8'} dependencies: - '@sentry/types': 7.85.0 - '@sentry/utils': 7.85.0 + '@sentry/types': 7.88.0 + '@sentry/utils': 7.88.0 dev: false - /@sentry/integrations@7.85.0: - resolution: {integrity: sha512-c/uEhrFbAefK00cnm/SjqZ31rWVsruiQWAvV4dxU/rSQ2dBWDuJz1woXX7Wd03yCSMq14tXtiDy9aTC4xCZ71w==} + /@sentry/integrations@7.88.0: + resolution: {integrity: sha512-YBYPAtJeylMaaCmGntgiDpp1nk3IT6+FBXsmHxMdTKlrpt5ELj/jcc8gEgaRNeSBjx4Kv1OVzmZcYyWwEhkR4Q==} engines: {node: '>=8'} dependencies: - '@sentry/core': 7.85.0 - '@sentry/types': 7.85.0 - '@sentry/utils': 7.85.0 + '@sentry/core': 7.88.0 + '@sentry/types': 7.88.0 + '@sentry/utils': 7.88.0 localforage: 1.10.0 dev: false - /@sentry/node@7.85.0: - resolution: {integrity: sha512-uiBtRW9G017NHoCXBlK3ttkTwHXLFyI8ndHpaObtyajKTv3ptGIThVEn7DuK7Pwor//RjwjSEEOa7WDK+FdMVQ==} + /@sentry/node@7.88.0: + resolution: {integrity: sha512-X6Xyh7AEitnWqn1CHQrmsUqRn0GKj/6nPE5VC2DLQfHiFH1Fknrt+csFzDchQ/86awXYwuY4Le5ECEH//X/WzQ==} engines: {node: '>=8'} dependencies: - '@sentry-internal/tracing': 7.85.0 - '@sentry/core': 7.85.0 - '@sentry/types': 7.85.0 - '@sentry/utils': 7.85.0 + '@sentry-internal/tracing': 7.88.0 + '@sentry/core': 7.88.0 + '@sentry/types': 7.88.0 + '@sentry/utils': 7.88.0 https-proxy-agent: 5.0.1 transitivePeerDependencies: - supports-color dev: false - /@sentry/replay@7.85.0: - resolution: {integrity: sha512-zVtTKfO+lu5qTwHpETI/oGo8hU3rdKHr3CdI1vRLw+d60PcAa/pWVlXsQeLRTw8PFwE358gHcpFZezj/11afew==} + /@sentry/replay@7.88.0: + resolution: {integrity: sha512-em5dPKLPG7c/HGDbpIj3aHrWbA4iMwqjevqTzn+++KNO1YslkOosCaGsb1whU3AL1T9c3aIFIhZ4u3rNo+DxcA==} engines: {node: '>=12'} dependencies: - '@sentry-internal/tracing': 7.85.0 - '@sentry/core': 7.85.0 - '@sentry/types': 7.85.0 - '@sentry/utils': 7.85.0 + '@sentry-internal/tracing': 7.88.0 + '@sentry/core': 7.88.0 + '@sentry/types': 7.88.0 + '@sentry/utils': 7.88.0 dev: false - /@sentry/svelte@7.85.0(svelte@4.2.8): - resolution: {integrity: sha512-XKXMpNJJ2GShl08kQvw8G4/aq2zaSpBkNEK3JNN6jAcLfMdHqbc8DSRFiDXdZt8udEa/4s3RqUOj/nApckmi0A==} + /@sentry/svelte@7.88.0(svelte@4.2.8): + resolution: {integrity: sha512-H1nVPfb8GXIj9HAa3Hw11yrWs4yUpm88+eW4eT1ryZeoIThcT4mSvqkFLWMq9APmoOjtXMF+LTi+aCboJMqbEg==} engines: {node: '>=8'} peerDependencies: svelte: 3.x || 4.x dependencies: - '@sentry/browser': 7.85.0 - '@sentry/types': 7.85.0 - '@sentry/utils': 7.85.0 + '@sentry/browser': 7.88.0 + '@sentry/types': 7.88.0 + '@sentry/utils': 7.88.0 magic-string: 0.30.5 svelte: 4.2.8 dev: false - /@sentry/sveltekit@7.85.0(@sveltejs/kit@1.27.6)(svelte@4.2.8): - resolution: {integrity: sha512-EqNsNeFQPNFnKYQAWdb62MfwKnE8xA1hjRomWZfhj7nyysAjRxREUoiyvsGU2s+gdW5nIt0ocAn5dEfwomggSg==} + /@sentry/sveltekit@7.88.0(@sveltejs/kit@1.30.3)(svelte@4.2.8): + resolution: {integrity: sha512-ZkpTPOBb9RHWAenqasGVSQl3XxuYEecrEJVUignF+Dz7hpO/vpprihnFIp4QVnb5Tzjw6ba05/HCgzIQqJMfnA==} engines: {node: '>=16'} peerDependencies: '@sveltejs/kit': 1.x dependencies: - '@sentry-internal/tracing': 7.85.0 - '@sentry/core': 7.85.0 - '@sentry/integrations': 7.85.0 - '@sentry/node': 7.85.0 - '@sentry/svelte': 7.85.0(svelte@4.2.8) - '@sentry/types': 7.85.0 - '@sentry/utils': 7.85.0 + '@sentry-internal/tracing': 7.88.0 + '@sentry/core': 7.88.0 + '@sentry/integrations': 7.88.0 + '@sentry/node': 7.88.0 + '@sentry/svelte': 7.88.0(svelte@4.2.8) + '@sentry/types': 7.88.0 + '@sentry/utils': 7.88.0 '@sentry/vite-plugin': 0.6.1 - '@sveltejs/kit': 1.27.6(svelte@4.2.8)(vite@4.5.1) + '@sveltejs/kit': 1.30.3(svelte@4.2.8)(vite@4.5.1) magicast: 0.2.8 sorcery: 0.11.0 transitivePeerDependencies: @@ -1429,8 +1705,8 @@ packages: engines: {node: '>=8'} dev: false - /@sentry/types@7.85.0: - resolution: {integrity: sha512-R5jR4XkK5tBU2jDiPdSVqzkmjYRr666bcGaFGUHB/xDQCjPsjk+pEmCCL+vpuWoaZmQJUE1hVU7rgnVX81w8zg==} + /@sentry/types@7.88.0: + resolution: {integrity: sha512-FvwvmX1pWAZKicPj4EpKyho8Wm+C4+r5LiepbbBF8oKwSPJdD2QV1fo/LWxsrzNxWOllFIVIXF5Ed3nPYQWpTw==} engines: {node: '>=8'} dev: false @@ -1441,11 +1717,11 @@ packages: '@sentry/types': 7.77.0 dev: false - /@sentry/utils@7.85.0: - resolution: {integrity: sha512-JZ7seNOLvhjAQ8GeB3GYknPQJkuhF88xAYOaESZP3xPOWBMFUN+IO4RqjMqMLFDniOwsVQS7GB/MfP+hxufieg==} + /@sentry/utils@7.88.0: + resolution: {integrity: sha512-ukminfRmdBXTzk49orwJf3Lu3hR60ZRHjE2a4IXwYhyDT6JJgJqgsq1hzGXx0AyFfyS4WhfZ6QUBy7fu3BScZQ==} engines: {node: '>=8'} dependencies: - '@sentry/types': 7.85.0 + '@sentry/types': 7.88.0 dev: false /@sentry/vite-plugin@0.6.1: @@ -1470,29 +1746,29 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@sveltejs/adapter-auto@2.1.1(@sveltejs/kit@1.27.6): + /@sveltejs/adapter-auto@2.1.1(@sveltejs/kit@1.30.3): resolution: {integrity: sha512-nzi6x/7/3Axh5VKQ8Eed3pYxastxoa06Y/bFhWb7h3Nu+nGRVxKAy3+hBJgmPCwWScy8n0TsstZjSVKfyrIHkg==} peerDependencies: '@sveltejs/kit': ^1.0.0 dependencies: - '@sveltejs/kit': 1.27.6(svelte@4.2.8)(vite@4.5.1) + '@sveltejs/kit': 1.30.3(svelte@4.2.8)(vite@4.5.1) import-meta-resolve: 4.0.0 dev: true - /@sveltejs/adapter-vercel@3.1.0(@sveltejs/kit@1.27.6): + /@sveltejs/adapter-vercel@3.1.0(@sveltejs/kit@1.30.3): resolution: {integrity: sha512-AkG7GuqPj/70zxfuOV7QbxXVuYFPUlyFEPlGUSXynDbIBTYu1Er+c676M2egnAyw0flB+kpj6nlxJIElRLKAaA==} peerDependencies: '@sveltejs/kit': ^1.5.0 dependencies: - '@sveltejs/kit': 1.27.6(svelte@4.2.8)(vite@4.5.1) + '@sveltejs/kit': 1.30.3(svelte@4.2.8)(vite@4.5.1) '@vercel/nft': 0.24.4 esbuild: 0.18.20 transitivePeerDependencies: - encoding - supports-color - /@sveltejs/kit@1.27.6(svelte@4.2.8)(vite@4.5.1): - resolution: {integrity: sha512-GsjTkMbKzXdbeRg0tk8S7HNShQ4879ftRr0ZHaZfjbig1xQwG57Bvcm9U9/mpLJtCapLbLWUnygKrgcLISLC8A==} + /@sveltejs/kit@1.30.3(svelte@4.2.8)(vite@4.5.1): + resolution: {integrity: sha512-0DzVXfU4h+tChFvoc8C61IqErCyskD4ydSIDjpKS2lYlEzIYrtYrY7juSqACFxqcvZAnOEXvSY+zZ8br0+ZMMg==} engines: {node: ^16.14 || >=18} hasBin: true requiresBuild: true @@ -1514,7 +1790,7 @@ packages: svelte: 4.2.8 tiny-glob: 0.2.9 undici: 5.26.5 - vite: 4.5.1(@types/node@18.19.2)(sass@1.69.5) + vite: 4.5.1(@types/node@18.19.3)(sass@1.69.5) transitivePeerDependencies: - supports-color @@ -1529,7 +1805,7 @@ packages: '@sveltejs/vite-plugin-svelte': 2.5.2(svelte@4.2.8)(vite@4.5.1) debug: 4.3.4 svelte: 4.2.8 - vite: 4.5.1(@types/node@18.19.2)(sass@1.69.5) + vite: 4.5.1(@types/node@18.19.3)(sass@1.69.5) transitivePeerDependencies: - supports-color @@ -1547,7 +1823,7 @@ packages: magic-string: 0.30.5 svelte: 4.2.8 svelte-hmr: 0.15.3(svelte@4.2.8) - vite: 4.5.1(@types/node@18.19.2)(sass@1.69.5) + vite: 4.5.1(@types/node@18.19.3)(sass@1.69.5) vitefu: 0.2.5(vite@4.5.1) transitivePeerDependencies: - supports-color @@ -1591,8 +1867,8 @@ packages: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true - /@types/node@18.19.2: - resolution: {integrity: sha512-6wzfBdbWpe8QykUkXBjtmO3zITA0A3FIjoy+in0Y2K4KrCiRhNYJIdwAPDffZ3G6GnaKaSLSEa9ZuORLfEoiwg==} + /@types/node@18.19.3: + resolution: {integrity: sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==} dependencies: undici-types: 5.26.5 @@ -1608,8 +1884,8 @@ packages: resolution: {integrity: sha512-ue/hDUpPjC85m+PM9OQDMZr3LywT+CT6mPsQq8OJtCLiERkGRcQUFvu9XASF5XWqyZFXbf15lvb3JFJ4dRLWPg==} dev: false - /@typescript-eslint/eslint-plugin@6.13.2(@typescript-eslint/parser@6.13.2)(eslint@8.55.0)(typescript@5.3.2): - resolution: {integrity: sha512-3+9OGAWHhk4O1LlcwLBONbdXsAhLjyCFogJY/cWy2lxdVJ2JrcTF2pTGMaLl2AE7U1l31n8Py4a8bx5DLf/0dQ==} + /@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.55.0)(typescript@5.3.3): + resolution: {integrity: sha512-1ZJBykBCXaSHG94vMMKmiHoL0MhNHKSVlcHVYZNw+BKxufhqQVTOawNpwwI1P5nIFZ/4jLVop0mcY6mJJDFNaw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -1620,25 +1896,25 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.13.2(eslint@8.55.0)(typescript@5.3.2) - '@typescript-eslint/scope-manager': 6.13.2 - '@typescript-eslint/type-utils': 6.13.2(eslint@8.55.0)(typescript@5.3.2) - '@typescript-eslint/utils': 6.13.2(eslint@8.55.0)(typescript@5.3.2) - '@typescript-eslint/visitor-keys': 6.13.2 + '@typescript-eslint/parser': 6.14.0(eslint@8.55.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 6.14.0 + '@typescript-eslint/type-utils': 6.14.0(eslint@8.55.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.14.0(eslint@8.55.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.14.0 debug: 4.3.4 eslint: 8.55.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.3.2) - typescript: 5.3.2 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.13.2(eslint@8.55.0)(typescript@5.3.2): - resolution: {integrity: sha512-MUkcC+7Wt/QOGeVlM8aGGJZy1XV5YKjTpq9jK6r6/iLsGXhBVaGP5N0UYvFsu9BFlSpwY9kMretzdBH01rkRXg==} + /@typescript-eslint/parser@6.14.0(eslint@8.55.0)(typescript@5.3.3): + resolution: {integrity: sha512-QjToC14CKacd4Pa7JK4GeB/vHmWFJckec49FR4hmIRf97+KXole0T97xxu9IFiPxVQ1DBWrQ5wreLwAGwWAVQA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1647,27 +1923,27 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.13.2 - '@typescript-eslint/types': 6.13.2 - '@typescript-eslint/typescript-estree': 6.13.2(typescript@5.3.2) - '@typescript-eslint/visitor-keys': 6.13.2 + '@typescript-eslint/scope-manager': 6.14.0 + '@typescript-eslint/types': 6.14.0 + '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.14.0 debug: 4.3.4 eslint: 8.55.0 - typescript: 5.3.2 + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@6.13.2: - resolution: {integrity: sha512-CXQA0xo7z6x13FeDYCgBkjWzNqzBn8RXaE3QVQVIUm74fWJLkJkaHmHdKStrxQllGh6Q4eUGyNpMe0b1hMkXFA==} + /@typescript-eslint/scope-manager@6.14.0: + resolution: {integrity: sha512-VT7CFWHbZipPncAZtuALr9y3EuzY1b1t1AEkIq2bTXUPKw+pHoXflGNG5L+Gv6nKul1cz1VH8fz16IThIU0tdg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.13.2 - '@typescript-eslint/visitor-keys': 6.13.2 + '@typescript-eslint/types': 6.14.0 + '@typescript-eslint/visitor-keys': 6.14.0 dev: true - /@typescript-eslint/type-utils@6.13.2(eslint@8.55.0)(typescript@5.3.2): - resolution: {integrity: sha512-Qr6ssS1GFongzH2qfnWKkAQmMUyZSyOr0W54nZNU1MDfo+U4Mv3XveeLZzadc/yq8iYhQZHYT+eoXJqnACM1tw==} + /@typescript-eslint/type-utils@6.14.0(eslint@8.55.0)(typescript@5.3.3): + resolution: {integrity: sha512-x6OC9Q7HfYKqjnuNu5a7kffIYs3No30isapRBJl1iCHLitD8O0lFbRcVGiOcuyN837fqXzPZ1NS10maQzZMKqw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1676,23 +1952,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.13.2(typescript@5.3.2) - '@typescript-eslint/utils': 6.13.2(eslint@8.55.0)(typescript@5.3.2) + '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3) + '@typescript-eslint/utils': 6.14.0(eslint@8.55.0)(typescript@5.3.3) debug: 4.3.4 eslint: 8.55.0 - ts-api-utils: 1.0.3(typescript@5.3.2) - typescript: 5.3.2 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@6.13.2: - resolution: {integrity: sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==} + /@typescript-eslint/types@6.14.0: + resolution: {integrity: sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.13.2(typescript@5.3.2): - resolution: {integrity: sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w==} + /@typescript-eslint/typescript-estree@6.14.0(typescript@5.3.3): + resolution: {integrity: sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -1700,20 +1976,20 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.13.2 - '@typescript-eslint/visitor-keys': 6.13.2 + '@typescript-eslint/types': 6.14.0 + '@typescript-eslint/visitor-keys': 6.14.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@5.3.2) - typescript: 5.3.2 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.13.2(eslint@8.55.0)(typescript@5.3.2): - resolution: {integrity: sha512-b9Ptq4eAZUym4idijCRzl61oPCwwREcfDI8xGk751Vhzig5fFZR9CyzDz4Sp/nxSLBYxUPyh4QdIDqWykFhNmQ==} + /@typescript-eslint/utils@6.14.0(eslint@8.55.0)(typescript@5.3.3): + resolution: {integrity: sha512-XwRTnbvRr7Ey9a1NT6jqdKX8y/atWG+8fAIu3z73HSP8h06i3r/ClMhmaF/RGWGW1tHJEwij1uEg2GbEmPYvYg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1721,9 +1997,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.6 - '@typescript-eslint/scope-manager': 6.13.2 - '@typescript-eslint/types': 6.13.2 - '@typescript-eslint/typescript-estree': 6.13.2(typescript@5.3.2) + '@typescript-eslint/scope-manager': 6.14.0 + '@typescript-eslint/types': 6.14.0 + '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3) eslint: 8.55.0 semver: 7.5.4 transitivePeerDependencies: @@ -1731,11 +2007,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@6.13.2: - resolution: {integrity: sha512-OGznFs0eAQXJsp+xSd6k/O1UbFi/K/L7WjqeRoFE7vadjAF9y0uppXhYNQNEqygjou782maGClOoZwPqF0Drlw==} + /@typescript-eslint/visitor-keys@6.14.0: + resolution: {integrity: sha512-fB5cw6GRhJUz03MrROVuj5Zm/Q+XWlVdIsFj+Zb1Hvqouc8t+XP2H5y53QYU/MGtd2dPg6/vJJlhoX3xc2ehfw==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.13.2 + '@typescript-eslint/types': 6.14.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1973,13 +2249,13 @@ packages: dependencies: file-uri-to-path: 1.0.0 - /bits-ui@0.0.27(@sveltejs/kit@1.27.6)(svelte@4.2.8): + /bits-ui@0.0.27(@sveltejs/kit@1.30.3)(svelte@4.2.8): resolution: {integrity: sha512-T/8BjEVvAOlp+1ofg4JRiwjv5m/320KUrWk5ONrjzmZVZ5d+uIlGwHmdVysbVtygHxf+FWi8CCKSPYrbxmQUYA==} peerDependencies: svelte: ^4.0.0 dependencies: '@melt-ui/svelte': 0.37.2(svelte@4.2.8) - '@sveltejs/adapter-vercel': 3.1.0(@sveltejs/kit@1.27.6) + '@sveltejs/adapter-vercel': 3.1.0(@sveltejs/kit@1.30.3) nanoid: 4.0.2 shiki: 0.14.5 svelte: 4.2.8 @@ -2406,7 +2682,7 @@ packages: eslint: 8.55.0 dev: true - /eslint-plugin-svelte@2.35.1(eslint@8.55.0)(svelte@4.2.8)(ts-node@10.9.1): + /eslint-plugin-svelte@2.35.1(eslint@8.55.0)(svelte@4.2.8)(ts-node@10.9.2): resolution: {integrity: sha512-IF8TpLnROSGy98Z3NrsKXWDSCbNY2ReHDcrYTuXZMbfX7VmESISR78TWgO9zdg4Dht1X8coub5jKwHzP0ExRug==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: @@ -2424,7 +2700,7 @@ packages: esutils: 2.0.3 known-css-properties: 0.29.0 postcss: 8.4.32 - postcss-load-config: 3.1.4(postcss@8.4.32)(ts-node@10.9.1) + postcss-load-config: 3.1.4(postcss@8.4.32)(ts-node@10.9.2) postcss-safe-parser: 6.0.0(postcss@8.4.32) postcss-selector-parser: 6.0.13 semver: 7.5.4 @@ -2647,7 +2923,7 @@ packages: is-callable: 1.2.7 dev: false - /formsnap@0.0.9(svelte@4.2.8)(sveltekit-superforms@1.11.0)(zod@3.22.4): + /formsnap@0.0.9(svelte@4.2.8)(sveltekit-superforms@1.12.0)(zod@3.22.4): resolution: {integrity: sha512-PJ/UU0+nfdyywc73sN016tF0+aPVhy37M43MY9jbtjrDuhFcibQ4EoCG3b8NtyBMSTWf785SuzAo8jdADiQVcg==} peerDependencies: svelte: ^4.0.0 @@ -2655,7 +2931,7 @@ packages: zod: ^3.22.2 dependencies: svelte: 4.2.8 - sveltekit-superforms: 1.11.0(@sveltejs/kit@1.27.6)(svelte@4.2.8)(zod@3.22.4) + sveltekit-superforms: 1.12.0(@sveltejs/kit@1.30.3)(svelte@4.2.8)(zod@3.22.4) zod: 3.22.4 dev: false @@ -3131,8 +3407,10 @@ packages: dependencies: yallist: 4.0.0 - /lucia@2.7.4: - resolution: {integrity: sha512-do6Aah5kX2DUl7N0CvELWV1/b+qZGF0AUmUrkthYeNfXfgx4RAkWi4BkAlgGDBB/0c1WApb18mUD1pA5qTaWmw==} + /lucia@3.0.0-beta.12: + resolution: {integrity: sha512-BqazR0IVm5xfURR6G+mjcL77ttDHTdX+qWqaHP121fKIU27rYqUBTAxVYP3252W3gDblFmSYlnhxzkJzI+z/dw==} + dependencies: + oslo: 0.23.5 dev: false /lucide-svelte@0.256.1(svelte@4.2.8): @@ -3369,8 +3647,8 @@ packages: dependencies: wrappy: 1.0.2 - /open-props@1.6.13: - resolution: {integrity: sha512-2RnJCI3tBHpj1FHSw+jTF1BjdfnpV99IMzZB00srkEX5wy33sR6zdcE0xFVE61VKrgd6QIW6w90NAaR2lIKhqQ==} + /open-props@1.6.16: + resolution: {integrity: sha512-QogvUMJUa/SxW5kjmZM+6bqSE2JMLKNWRbFUksEJAGYC9tmewuavHzZPq+dCeZtam+n0Q+D6DGA0DPjNeCVJNg==} dev: false /optionator@0.9.3: @@ -3385,6 +3663,20 @@ packages: type-check: 0.4.0 dev: true + /oslo@0.23.5: + resolution: {integrity: sha512-G+q/MkR0IPaUA1+FpHL0pneAHJzhNpg9P4VXASy4JQy1KGFyfhi30DphVHYNKQC+C05VhDi/sTGdOX+yfcrT3g==} + dependencies: + '@node-rs/argon2': 1.5.2 + '@node-rs/bcrypt': 1.7.3 + dev: false + + /oslo@0.24.0: + resolution: {integrity: sha512-ALOypmwQXyu7AluDqF/EySx7AjWk85gHKY+3yb2LaZ5vArc2jxxZF6tNwGKQ3Rb968ednCFf3opAOoaetRN9+g==} + dependencies: + '@node-rs/argon2': 1.5.2 + '@node-rs/bcrypt': 1.7.3 + dev: false + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -3694,7 +3986,7 @@ packages: postcss: 8.4.32 dev: true - /postcss-load-config@3.1.4(postcss@8.4.32)(ts-node@10.9.1): + /postcss-load-config@3.1.4(postcss@8.4.32)(ts-node@10.9.2): resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -3708,11 +4000,11 @@ packages: dependencies: lilconfig: 2.1.0 postcss: 8.4.32 - ts-node: 10.9.1(@types/node@18.19.2)(typescript@5.3.2) + ts-node: 10.9.2(@types/node@18.19.3)(typescript@5.3.3) yaml: 1.10.2 dev: true - /postcss-load-config@4.0.2(postcss@8.4.32)(ts-node@10.9.1): + /postcss-load-config@4.0.2(postcss@8.4.32)(ts-node@10.9.2): resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} engines: {node: '>= 14'} peerDependencies: @@ -3726,7 +4018,7 @@ packages: dependencies: lilconfig: 3.0.0 postcss: 8.4.32 - ts-node: 10.9.1(@types/node@18.19.2)(typescript@5.3.2) + ts-node: 10.9.2(@types/node@18.19.3)(typescript@5.3.3) yaml: 2.3.4 /postcss-logical@7.0.0(postcss@8.4.32): @@ -3934,18 +4226,18 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prettier-plugin-svelte@3.1.2(prettier@3.1.0)(svelte@4.2.8): + /prettier-plugin-svelte@3.1.2(prettier@3.1.1)(svelte@4.2.8): resolution: {integrity: sha512-7xfMZtwgAWHMT0iZc8jN4o65zgbAQ3+O32V6W7pXrqNvKnHnkoyQCGCbKeUyXKZLbYE0YhFRnamfxfkEGxm8qA==} peerDependencies: prettier: ^3.0.0 svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 dependencies: - prettier: 3.1.0 + prettier: 3.1.1 svelte: 4.2.8 dev: true - /prettier@3.1.0: - resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==} + /prettier@3.1.1: + resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} engines: {node: '>=14'} hasBin: true dev: true @@ -3959,13 +4251,13 @@ packages: react-is: 18.2.0 dev: true - /prisma@5.6.0: - resolution: {integrity: sha512-EEaccku4ZGshdr2cthYHhf7iyvCcXqwJDvnoQRAJg5ge2Tzpv0e2BaMCp+CbbDUwoVTzwgOap9Zp+d4jFa2O9A==} + /prisma@5.7.0: + resolution: {integrity: sha512-0rcfXO2ErmGAtxnuTNHQT9ztL0zZheQjOI/VNJzdq87C3TlGPQtMqtM+KCwU6XtmkoEr7vbCQqA7HF9IY0ST+Q==} engines: {node: '>=16.13'} hasBin: true requiresBuild: true dependencies: - '@prisma/engines': 5.6.0 + '@prisma/engines': 5.7.0 /progress@2.0.3: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} @@ -4142,12 +4434,12 @@ packages: yoga-wasm-web: 0.3.3 dev: false - /schema-dts@1.1.2(typescript@5.3.2): + /schema-dts@1.1.2(typescript@5.3.3): resolution: {integrity: sha512-MpNwH0dZJHinVxk9bT8XUdjKTxMYrA5bLtrrGmFA6PTLwlOKnhi67XoRd6/ty+Djt6ZC0slR57qFhZDNMI6DhQ==} peerDependencies: typescript: '>=4.1.0' dependencies: - typescript: 5.3.2 + typescript: 5.3.3 dev: true /semver@6.3.1: @@ -4325,8 +4617,8 @@ packages: picocolors: 1.0.0 sade: 1.8.1 svelte: 4.2.8 - svelte-preprocess: 5.1.1(postcss-load-config@4.0.2)(postcss@8.4.32)(sass@1.69.5)(svelte@4.2.8)(typescript@5.3.2) - typescript: 5.3.2 + svelte-preprocess: 5.1.2(postcss-load-config@4.0.2)(postcss@8.4.32)(sass@1.69.5)(svelte@4.2.8)(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - '@babel/core' - coffeescript @@ -4377,19 +4669,19 @@ packages: resolution: {integrity: sha512-AZD6R60vksyojn21FgXLglmBiBB9K5Dkdu0hdGrLbCaRCYT68IsWkZfRUqKhMx1IfzqWcZQ8X9y/f+Ih0oNQkQ==} dev: false - /svelte-meta-tags@3.1.0(svelte@4.2.8)(typescript@5.3.2): + /svelte-meta-tags@3.1.0(svelte@4.2.8)(typescript@5.3.3): resolution: {integrity: sha512-wFBfpktSua1R5rdvQ/aFucvXmRqzDhRYrPpMQ/pL4+KL5QHIzomPf29a5WN3yDR0reSy1PXyQ2ah0+uCYCbi0g==} peerDependencies: svelte: ^3.55.0 || ^4.0.0 dependencies: - schema-dts: 1.1.2(typescript@5.3.2) + schema-dts: 1.1.2(typescript@5.3.3) svelte: 4.2.8 transitivePeerDependencies: - typescript dev: true - /svelte-preprocess@5.1.1(postcss-load-config@4.0.2)(postcss@8.4.32)(sass@1.69.5)(svelte@4.2.8)(typescript@5.3.2): - resolution: {integrity: sha512-p/Dp4hmrBW5mrCCq29lEMFpIJT2FZsRlouxEc5qpbOmXRbaFs7clLs8oKPwD3xCFyZfv1bIhvOzpQkhMEVQdMw==} + /svelte-preprocess@5.1.2(postcss-load-config@4.0.2)(postcss@8.4.32)(sass@1.69.5)(svelte@4.2.8)(typescript@5.3.3): + resolution: {integrity: sha512-XF0aliMAcYnP4hLETvB6HRAMnaL09ASYT1Z2I1Gwu0nz6xbdg/dSgAEthtFZJA4AKrNhFDFdmUDO+H9d/6xg5g==} engines: {node: '>= 14.10.0'} requiresBuild: true peerDependencies: @@ -4397,7 +4689,7 @@ packages: coffeescript: ^2.5.1 less: ^3.11.3 || ^4.0.0 postcss: ^7 || ^8 - postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 + postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 pug: ^3.0.0 sass: ^1.26.8 stylus: ^0.55.0 @@ -4430,12 +4722,12 @@ packages: detect-indent: 6.1.0 magic-string: 0.27.0 postcss: 8.4.32 - postcss-load-config: 4.0.2(postcss@8.4.32)(ts-node@10.9.1) + postcss-load-config: 4.0.2(postcss@8.4.32)(ts-node@10.9.2) sass: 1.69.5 sorcery: 0.11.0 strip-indent: 3.0.0 svelte: 4.2.8 - typescript: 5.3.2 + typescript: 5.3.3 dev: true /svelte-sequential-preprocessor@2.0.1: @@ -4472,24 +4764,24 @@ packages: magic-string: 0.30.5 periscopic: 3.1.0 - /sveltekit-flash-message@2.2.2(@sveltejs/kit@1.27.6)(svelte@4.2.8): + /sveltekit-flash-message@2.2.2(@sveltejs/kit@1.30.3)(svelte@4.2.8): resolution: {integrity: sha512-5xaQbkbEfzIMT2VfyJNtXl/20ugaBLc/9BzeQ+l4rHr+IoWC81qRANKAFlfZqZ2eCGPq1pzIhVeuxaPk74dAgA==} peerDependencies: '@sveltejs/kit': 1.x svelte: 3.x || 4.x dependencies: - '@sveltejs/kit': 1.27.6(svelte@4.2.8)(vite@4.5.1) + '@sveltejs/kit': 1.30.3(svelte@4.2.8)(vite@4.5.1) svelte: 4.2.8 dev: true - /sveltekit-superforms@1.11.0(@sveltejs/kit@1.27.6)(svelte@4.2.8)(zod@3.22.4): - resolution: {integrity: sha512-43hhy34Eb57erD2b+3Z6A97NBQHQ+ePXmGxeOqOATd7OeI1Vo/fw+vd5yGE9w/ql8DGDUqW1LKb4D3rJXdxSYg==} + /sveltekit-superforms@1.12.0(@sveltejs/kit@1.30.3)(svelte@4.2.8)(zod@3.22.4): + resolution: {integrity: sha512-yer9YKhfWsKsDIxXahFLuGuUel32gyi96qIdxTVFAOWXZM9ZaMEP7+FL2cMYRDg6Xqlrh5SQ9oQdkVYeLNG0eA==} peerDependencies: - '@sveltejs/kit': 1.x + '@sveltejs/kit': 1.x || 2.x svelte: 3.x || 4.x zod: 3.x dependencies: - '@sveltejs/kit': 1.27.6(svelte@4.2.8)(vite@4.5.1) + '@sveltejs/kit': 1.30.3(svelte@4.2.8)(vite@4.5.1) svelte: 4.2.8 zod: 3.22.4 @@ -4507,7 +4799,7 @@ packages: tailwindcss: '*' dependencies: tailwind-merge: 1.14.0 - tailwindcss: 3.3.6(ts-node@10.9.1) + tailwindcss: 3.3.6(ts-node@10.9.2) dev: false /tailwindcss-animate@1.0.7(tailwindcss@3.3.6): @@ -4515,10 +4807,10 @@ packages: peerDependencies: tailwindcss: '>=3.0.0 || insiders' dependencies: - tailwindcss: 3.3.6(ts-node@10.9.1) + tailwindcss: 3.3.6(ts-node@10.9.2) dev: false - /tailwindcss@3.3.6(ts-node@10.9.1): + /tailwindcss@3.3.6(ts-node@10.9.2): resolution: {integrity: sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==} engines: {node: '>=14.0.0'} hasBin: true @@ -4540,7 +4832,7 @@ packages: postcss: 8.4.32 postcss-import: 15.1.0(postcss@8.4.32) postcss-js: 4.0.1(postcss@8.4.32) - postcss-load-config: 4.0.2(postcss@8.4.32)(ts-node@10.9.1) + postcss-load-config: 4.0.2(postcss@8.4.32)(ts-node@10.9.2) postcss-nested: 6.0.1(postcss@8.4.32) postcss-selector-parser: 6.0.13 resolve: 1.22.8 @@ -4615,20 +4907,20 @@ packages: /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - /ts-api-utils@1.0.3(typescript@5.3.2): + /ts-api-utils@1.0.3(typescript@5.3.3): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.3.2 + typescript: 5.3.3 dev: true /ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - /ts-node@10.9.1(@types/node@18.19.2)(typescript@5.3.2): - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + /ts-node@10.9.2(@types/node@18.19.3)(typescript@5.3.3): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: '@swc/core': '>=1.2.50' @@ -4646,14 +4938,14 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 18.19.2 + '@types/node': 18.19.3 acorn: 8.11.2 acorn-walk: 8.3.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.3.2 + typescript: 5.3.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 @@ -4677,8 +4969,8 @@ packages: engines: {node: '>=10'} dev: true - /typescript@5.3.2: - resolution: {integrity: sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==} + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true @@ -4757,7 +5049,7 @@ packages: /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - /vite-node@0.34.6(@types/node@18.19.2)(sass@1.69.5): + /vite-node@0.34.6(@types/node@18.19.3)(sass@1.69.5): resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -4767,7 +5059,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.5.1(@types/node@18.19.2)(sass@1.69.5) + vite: 4.5.1(@types/node@18.19.3)(sass@1.69.5) transitivePeerDependencies: - '@types/node' - less @@ -4779,7 +5071,7 @@ packages: - terser dev: true - /vite@4.5.1(@types/node@18.19.2)(sass@1.69.5): + /vite@4.5.1(@types/node@18.19.3)(sass@1.69.5): resolution: {integrity: sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -4807,7 +5099,7 @@ packages: terser: optional: true dependencies: - '@types/node': 18.19.2 + '@types/node': 18.19.3 esbuild: 0.18.20 postcss: 8.4.32 rollup: 3.29.4 @@ -4823,7 +5115,7 @@ packages: vite: optional: true dependencies: - vite: 4.5.1(@types/node@18.19.2)(sass@1.69.5) + vite: 4.5.1(@types/node@18.19.3)(sass@1.69.5) /vitest@0.34.6(sass@1.69.5): resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} @@ -4858,7 +5150,7 @@ packages: dependencies: '@types/chai': 4.3.9 '@types/chai-subset': 1.3.4 - '@types/node': 18.19.2 + '@types/node': 18.19.3 '@vitest/expect': 0.34.6 '@vitest/runner': 0.34.6 '@vitest/snapshot': 0.34.6 @@ -4877,8 +5169,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.7.0 - vite: 4.5.1(@types/node@18.19.2)(sass@1.69.5) - vite-node: 0.34.6(@types/node@18.19.2)(sass@1.69.5) + vite: 4.5.1(@types/node@18.19.3)(sass@1.69.5) + vite-node: 0.34.6(@types/node@18.19.3)(sass@1.69.5) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -4979,8 +5271,8 @@ packages: /yoga-wasm-web@0.3.3: resolution: {integrity: sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA==} - /zod-to-json-schema@3.22.1(zod@3.22.4): - resolution: {integrity: sha512-bVSWQ2JF3ZglQefafkM+Kk9KQ2fqqSi4VhxWaup1NJX9FS5jDg0EkEioVCWui0PiIQvcXJUjmN71bg672+a+tA==} + /zod-to-json-schema@3.22.3(zod@3.22.4): + resolution: {integrity: sha512-9isG8SqRe07p+Aio2ruBZmLm2Q6Sq4EqmXOiNpDxp+7f0LV6Q/LX65fs5Nn+FV/CzfF3NLBoksXbS2jNYIfpKw==} peerDependencies: zod: ^3.22.4 dependencies: diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 61a1f11..0a15172 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -36,52 +36,41 @@ model UserRole { } model User { - id String @id @default(cuid()) - username String @unique - email String? @unique - firstName String? - lastName String? - roles UserRole[] - verified Boolean @default(false) - receiveEmail Boolean @default(false) - token String? @unique - collection Collection? - wishlist Wishlist? - list List[] - theme String @default("system") - created_at DateTime @default(now()) @db.Timestamp(6) - updated_at DateTime @updatedAt @db.Timestamp(6) - auth_session Session[] - auth_key Key[] + id String @id @default(cuid()) + username String @unique + hashed_password String? + email String? @unique + firstName String? + lastName String? + roles UserRole[] + verified Boolean @default(false) + receiveEmail Boolean @default(false) + collection Collection? + wishlist Wishlist? + list List[] + theme String @default("system") + created_at DateTime @default(now()) @db.Timestamp(6) + updated_at DateTime @updatedAt @db.Timestamp(6) + sessions Session[] @@map("users") } model Session { - id String @id @unique - user_id String - active_expires BigInt - idle_expires BigInt - user User @relation(references: [id], fields: [user_id], onDelete: Cascade) + id String @id @unique + userId String + country String + expiresAt DateTime + user User @relation(references: [id], fields: [userId], onDelete: Cascade) - @@index([user_id]) + @@index([userId]) @@map("sessions") } -model Key { - id String @id @unique - hashed_password String? - user_id String - user User @relation(references: [id], fields: [user_id], onDelete: Cascade) - - @@index([user_id]) - @@map("keys") -} - model Collection { - id String @id @default(cuid()) - user_id String @unique - user User @relation(references: [id], fields: [user_id]) + id String @id @default(cuid()) + user_id String @unique + user User @relation(references: [id], fields: [user_id]) items CollectionItem[] @@index([user_id]) diff --git a/src/app.d.ts b/src/app.d.ts index 5c84e15..5c7acf8 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -14,7 +14,7 @@ declare global { } interface Locals { auth: import('lucia').AuthRequest; - user: Lucia.UserAttributes; + user: import('lucia').User | null; prisma: PrismaClient; startTimer: number; error: string; @@ -43,14 +43,14 @@ declare global { // interface Error {} // interface Platform {} -/// -declare global { - namespace Lucia { - type Auth = import('$lib/server/lucia').Auth; - type DatabaseUserAttributes = User; - type DatabaseSessionAttributes = {}; - } -} +// /// +// declare global { +// namespace Lucia { +// type Auth = import('$lib/server/lucia').Auth; +// type DatabaseUserAttributes = User; +// type DatabaseSessionAttributes = {}; +// } +// } // THIS IS IMPORTANT!!! export {}; diff --git a/src/hooks.server.ts b/src/hooks.server.ts index f52e6af..97215e1 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -2,7 +2,7 @@ import * as Sentry from '@sentry/sveltekit'; import { sequence } from '@sveltejs/kit/hooks'; import type { Handle } from '@sveltejs/kit'; import { dev } from '$app/environment'; -import { auth } from '$lib/server/lucia'; +import { lucia } from '$lib/server/auth'; Sentry.init({ dsn: 'https://742e43279df93a3c4a4a78c12eb1f879@o4506057768632320.ingest.sentry.io/4506057770401792', @@ -14,22 +14,31 @@ export const authentication: Handle = async function ({ event, resolve }) { const startTimer = Date.now(); event.locals.startTimer = startTimer; - event.locals.auth = auth.handleRequest(event); - if (event?.locals?.auth) { - try { - const session = await event.locals.auth.validate(); - event.locals.user = session?.user; - // if (event.route.id?.startsWith('/(protected)')) { - // if (!user) throw redirect(302, '/sign-in'); - // if (!user.verified) throw redirect(302, '/verify/email'); - // } - } catch (error) { - console.error('Error validating user', error); - } - } else { - console.log('auth empty'); + const ip = event.request.headers.get('x-forwarded-for') as string || event.getClientAddress(); + const country = event.request.headers.get('x-vercel-ip-country') as string || 'unknown'; + event.locals.session = { + ip, + country + }; + + const sessionId = event.cookies.get(lucia.sessionCookieName); + if (!sessionId) { + event.locals.user = null; + return resolve(event); } - return await resolve(event); + + const { session, user } = await lucia.validateSession(sessionId); + if (session && session.fresh) { + const sessionCookie = lucia.createSessionCookie(session.id); + event.cookies.set(sessionCookie.name, sessionCookie.value, sessionCookie.attributes); + } + if (!session) { + const sessionCookie = lucia.createBlankSessionCookie(); + event.cookies.set(sessionCookie.name, sessionCookie.value, sessionCookie.attributes); + } + event.locals.user = user; + + return resolve(event); }; export const handle: Handle = sequence(sequence(Sentry.sentryHandle(), authentication)); diff --git a/src/lib/server/auth.ts b/src/lib/server/auth.ts new file mode 100644 index 0000000..829d2b0 --- /dev/null +++ b/src/lib/server/auth.ts @@ -0,0 +1,54 @@ +// lib/server/lucia.ts +import { Lucia, TimeSpan } from 'lucia'; +import { PrismaAdapter } from '@lucia-auth/adapter-prisma'; +import { dev } from '$app/environment'; +import prisma_client from '$lib/prisma'; +import { webcrypto } from "node:crypto"; + +globalThis.crypto = webcrypto as Crypto; + +const adapter = new PrismaAdapter(prisma_client.session, prisma_client.user); + +export const lucia = new Lucia(adapter, { + getSessionAttributes: (attributes) => { + return { + country: attributes.country, + }; + }, + getUserAttributes: (attributes) => { + return { + username: attributes.username, + email: attributes.email, + firstName: attributes.firstName, + lastName: attributes.lastName, + theme: attributes.theme + }; + }, + sessionExpiresIn: new TimeSpan(30, "d"), // 30 days + sessionCookie: { + name: 'session', + expires: false, // session cookies have very long lifespan (2 years) + attributes: { + // set to `true` when using HTTPS + secure: !dev, + sameSite: 'strict', + domain: dev ? 'localhost' : 'boredgame.vercel.app', + } + }, +}); + +declare module "lucia" { + interface Register { + Lucia: typeof lucia; + } + interface DatabaseSessionAttributes { + country: string; + } + interface DatabaseUserAttributes { + username: string; + email: string; + firstName: string; + lastName: string; + theme: string; + } +} diff --git a/src/lib/server/lucia.ts b/src/lib/server/lucia.ts deleted file mode 100644 index f5be73f..0000000 --- a/src/lib/server/lucia.ts +++ /dev/null @@ -1,29 +0,0 @@ -// lib/server/lucia.ts -import { lucia } from 'lucia'; -import { sveltekit } from 'lucia/middleware'; -import { prisma } from '@lucia-auth/adapter-prisma'; -import { dev } from '$app/environment'; -import prisma_client from '$lib/prisma'; - -export const auth = lucia({ - env: dev ? 'DEV' : 'PROD', - middleware: sveltekit(), - adapter: prisma(prisma_client), - getUserAttributes: (databaseUser) => { - return { - username: databaseUser.username, - email: databaseUser.email, - firstName: databaseUser.firstName, - lastName: databaseUser.lastName, - verified: databaseUser.verified, - receiveEmail: databaseUser.receiveEmail, - token: databaseUser.token, - theme: databaseUser.theme - }; - }, - experimental: { - debugMode: false - } -}); - -export type Auth = typeof auth; diff --git a/src/lib/utils/verifyEmail.ts b/src/lib/utils/verifyEmail.ts new file mode 100644 index 0000000..77eb211 --- /dev/null +++ b/src/lib/utils/verifyEmail.ts @@ -0,0 +1,3 @@ +export function isValidEmail(email: string): boolean { + return /.+@.+/.test(email); +} \ No newline at end of file diff --git a/src/routes/(app)/(protected)/collection/+page.server.ts b/src/routes/(app)/(protected)/collection/+page.server.ts index a63eac7..a6eaa1b 100644 --- a/src/routes/(app)/(protected)/collection/+page.server.ts +++ b/src/routes/(app)/(protected)/collection/+page.server.ts @@ -6,8 +6,8 @@ import { search_schema } from '$lib/zodValidation.js'; import type { PageServerLoad } from './$types'; export const load: PageServerLoad = async ({ fetch, url, locals }) => { - const session = await locals.auth.validate(); - if (!session) { + const user = locals.user; + if (!user) { throw redirect(302, '/login'); } @@ -30,7 +30,7 @@ export const load: PageServerLoad = async ({ fetch, url, locals }) => { try { let collection = await prisma.collection.findUnique({ where: { - user_id: session.user.userId + user_id: user.id } }); console.log('collection', collection); @@ -103,11 +103,11 @@ export const actions: Actions = { const { params, locals, request } = event; const form = await superValidate(event, modifyListGameSchema); - const session = await locals.auth.validate(); - if (!session) { - throw redirect(302, '/login'); + if (!event.locals.user) { + throw fail(401); } + const user = event.locals.user; let game = await prisma.game.findUnique({ where: { id: form.data.id @@ -127,7 +127,7 @@ export const actions: Actions = { try { const collection = await prisma.collection.findUnique({ where: { - user_id: session.user.userId + user_id: user.id } }); @@ -154,17 +154,15 @@ export const actions: Actions = { }, // Create new wishlist create: async ({ params, locals, request }) => { - const session = await locals.auth.validate(); - if (!session) { - throw redirect(302, '/login'); + if (!locals.user) { + throw fail(401); } return error(405, 'Method not allowed'); }, // Delete a wishlist delete: async ({ params, locals, request }) => { - const session = await locals.auth.validate(); - if (!session) { - throw redirect(302, '/login'); + if (!locals.user) { + throw fail(401); } return error(405, 'Method not allowed'); }, @@ -173,9 +171,8 @@ export const actions: Actions = { const { params, locals, request } = event; const form = await superValidate(event, modifyListGameSchema); - const session = await locals.auth.validate(); - if (!session) { - throw redirect(302, '/login'); + if (!locals.user) { + throw fail(401); } let game = await prisma.game.findUnique({ @@ -192,7 +189,7 @@ export const actions: Actions = { try { const collection = await prisma.collection.findUnique({ where: { - user_id: session.user.userId + user_id: locals.user.id } }); diff --git a/src/routes/(app)/(protected)/list/+layout.server.ts b/src/routes/(app)/(protected)/list/+layout.server.ts index 0daaf90..89a6cd1 100644 --- a/src/routes/(app)/(protected)/list/+layout.server.ts +++ b/src/routes/(app)/(protected)/list/+layout.server.ts @@ -1,10 +1,9 @@ -import { redirect } from '@sveltejs/kit'; +import { fail, redirect } from '@sveltejs/kit'; import prisma from '$lib/prisma'; export async function load({ locals }) { - const session = await locals.auth.validate(); - if (!session) { - throw redirect(302, '/login'); + if (!locals.user) { + throw fail(401); } try { diff --git a/src/routes/(app)/(protected)/list/[id]/+page.server.ts b/src/routes/(app)/(protected)/list/[id]/+page.server.ts index 13bece7..8aba2d0 100644 --- a/src/routes/(app)/(protected)/list/[id]/+page.server.ts +++ b/src/routes/(app)/(protected)/list/[id]/+page.server.ts @@ -3,8 +3,8 @@ import { superValidate } from 'sveltekit-superforms/server'; import prisma from '$lib/prisma'; export async function load({ params, locals }) { - const session = await locals.auth.validate(); - if (!session) { + const user = locals.user; + if (!user) { throw redirect(302, '/login'); } @@ -13,7 +13,7 @@ export async function load({ params, locals }) { where: { id: params.id, AND: { - user_id: session.userId + user_id: user.id } }, include: { @@ -46,11 +46,11 @@ export const actions: Actions = { const { params, locals, request } = event; const form = await superValidate(event, modifyListGameSchema); - const session = await locals.auth.validate(); - if (!session) { - throw redirect(302, '/login'); + if (!locals.user) { + throw fail(401); } + let game = await prisma.game.findUnique({ where: { id: form.id @@ -74,7 +74,7 @@ export const actions: Actions = { } }); - if (wishlist?.user_id !== session.userId) { + if (wishlist?.user_id !== locals.user.id) { return fail(401, { message: 'Unauthorized' }); @@ -103,23 +103,20 @@ export const actions: Actions = { }, // Create new wishlist create: async ({ params, locals, request }) => { - const session = await locals.auth.validate(); - if (!session) { - throw redirect(302, '/login'); + if (!locals.user) { + throw fail(401); } }, // Delete a wishlist delete: async ({ params, locals, request }) => { - const session = await locals.auth.validate(); - if (!session) { - throw redirect(302, '/login'); + if (!locals.user) { + throw fail(401); } }, // Remove game from a wishlist remove: async ({ params, locals, request }) => { - const session = await locals.auth.validate(); - if (!session) { - throw redirect(302, '/login'); + if (!locals.user) { + throw fail(401); } } }; diff --git a/src/routes/(app)/(protected)/profile/+page.server.ts b/src/routes/(app)/(protected)/profile/+page.server.ts index 0d35505..db7dfc0 100644 --- a/src/routes/(app)/(protected)/profile/+page.server.ts +++ b/src/routes/(app)/(protected)/profile/+page.server.ts @@ -1,9 +1,10 @@ import { fail, redirect, type Actions } from '@sveltejs/kit'; import { message, setError, superValidate } from 'sveltekit-superforms/server'; -import { LuciaError } from 'lucia'; +// import { LuciaError } from 'lucia'; import { userSchema } from '$lib/config/zod-schemas'; -import { auth } from '$lib/server/lucia.js'; +import { Lucia } from '$lib/server/auth.js'; import type { PageServerLoad } from './$types'; +import prisma from '$lib/prisma'; const profileSchema = userSchema.pick({ firstName: true, @@ -14,13 +15,12 @@ const profileSchema = userSchema.pick({ export const load: PageServerLoad = async (event) => { const form = await superValidate(event, profileSchema); - const session = await event.locals.auth.validate(); - if (!session) { + if (!event.locals.user) { throw redirect(302, '/login'); } - const { user } = session; + const { user } = event.locals; form.data = { firstName: user.firstName, @@ -42,25 +42,29 @@ export const actions: Actions = { form }); } + if (!event.locals.user) { + throw redirect(302, '/login'); + } try { console.log('updating profile'); - const session = await event.locals.auth.validate(); - if (!session) { - throw redirect(302, '/login'); - } + const user = event.locals.user; - const user = session.user; - - auth.updateUserAttributes(user.userId, { - firstName: form.data.firstName, - lastName: form.data.lastName, - email: form.data.email, - username: form.data.username + await prisma.user.update({ + where: { + id: user.id + }, + data: { + firstName: form.data.firstName, + lastName: form.data.lastName, + email: form.data.email, + username: form.data.username + } }); if (user.email !== form.data.email) { + // Send email to confirm new email? // auth.update // await locals.prisma.key.update({ // where: { @@ -75,7 +79,7 @@ export const actions: Actions = { // }); } } catch (e) { - if (e instanceof LuciaError && e.message === `AUTH_INVALID_USER_ID`) { + if (e.message === `AUTH_INVALID_USER_ID`) { // invalid user id console.error(e); } diff --git a/src/routes/(app)/(protected)/wishlist/+page.server.ts b/src/routes/(app)/(protected)/wishlist/+page.server.ts index 2ff504d..76e0023 100644 --- a/src/routes/(app)/(protected)/wishlist/+page.server.ts +++ b/src/routes/(app)/(protected)/wishlist/+page.server.ts @@ -4,17 +4,16 @@ import prisma from '$lib/prisma'; import { modifyListGameSchema } from '$lib/config/zod-schemas.js'; export async function load({ params, locals }) { - const session = await locals.auth.validate(); - if (!session) { + if (!locals.user) { throw redirect(302, '/login'); } - console.log('Wishlist load User id', session.user); + console.log('Wishlist load User id', locals.user.id); try { - let wishlist = await prisma.wishlist.findUnique({ + const wishlist = await prisma.wishlist.findUnique({ where: { - user_id: session?.user?.userId + user_id: locals.user.id }, include: { items: { @@ -49,16 +48,15 @@ export async function load({ params, locals }) { export const actions: Actions = { // Add game to a wishlist add: async (event) => { - const { params, locals, request } = event; + const { locals } = event; const form = await superValidate(event, modifyListGameSchema); try { - const session = await locals.auth.validate(); - if (!session) { + if (!locals.user) { throw redirect(302, '/login'); } - let game = await prisma.game.findUnique({ + const game = await prisma.game.findUnique({ where: { id: form.data.id } @@ -77,7 +75,7 @@ export const actions: Actions = { if (game) { const wishlist = await prisma.wishlist.findUnique({ where: { - user_id: session.user.userId + user_id: locals.user.id } }); @@ -103,33 +101,30 @@ export const actions: Actions = { } }, // Create new wishlist - create: async ({ params, locals, request }) => { - const session = await locals.auth.validate(); - if (!session) { + create: async ({ locals }) => { + if (!locals.user) { throw redirect(302, '/login'); } return error(405, 'Method not allowed'); }, // Delete a wishlist - delete: async ({ params, locals, request }) => { - const session = await locals.auth.validate(); - if (!session) { + delete: async ({ locals }) => { + if (!locals.user) { throw redirect(302, '/login'); } return error(405, 'Method not allowed'); }, // Remove game from a wishlist remove: async (event) => { - const { params, locals, request } = event; + const { locals } = event; const form = await superValidate(event, modifyListGameSchema); try { - const session = await locals.auth.validate(); - if (!session) { + if (!locals.user) { throw redirect(302, '/login'); } - let game = await prisma.game.findUnique({ + const game = await prisma.game.findUnique({ where: { id: form.data.id } @@ -148,7 +143,7 @@ export const actions: Actions = { if (game) { const wishlist = await prisma.wishlist.findUnique({ where: { - user_id: session.user.userId + user_id: locals.user.id } }); diff --git a/src/routes/(app)/game/[id]/+page.server.ts b/src/routes/(app)/game/[id]/+page.server.ts index 1c4a227..d8c1dac 100644 --- a/src/routes/(app)/game/[id]/+page.server.ts +++ b/src/routes/(app)/game/[id]/+page.server.ts @@ -68,7 +68,7 @@ export const load: PageServerLoad = async ({ params, locals, fetch }) => { if (user) { wishlist = await prisma.wishlist.findUnique({ where: { - user_id: user.userId + user_id: user.id }, include: { items: { @@ -81,7 +81,7 @@ export const load: PageServerLoad = async ({ params, locals, fetch }) => { collection = await prisma.collection.findUnique({ where: { - user_id: user.userId + user_id: user.id }, include: { items: { diff --git a/src/routes/(auth)/login/+page.server.ts b/src/routes/(auth)/login/+page.server.ts index 47e268e..b515cc6 100644 --- a/src/routes/(auth)/login/+page.server.ts +++ b/src/routes/(auth)/login/+page.server.ts @@ -2,7 +2,8 @@ import { fail, type Actions } from '@sveltejs/kit'; import { setError, superValidate } from 'sveltekit-superforms/server'; import { redirect } from 'sveltekit-flash-message/server'; import prisma from '$lib/prisma'; -import { auth } from '$lib/server/lucia'; +import { lucia } from '$lib/server/auth'; +import { Argon2id } from 'oslo/password'; import { userSchema } from '$lib/config/zod-schemas'; import type { PageServerLoad } from './$types'; @@ -15,11 +16,11 @@ export const load: PageServerLoad = async (event) => { const form = await superValidate(event, signInSchema); console.log('login load event', event); - const session = await event.locals.auth.validate(); - if (session) { + if (event.locals.user) { const message = { type: 'info', message: 'You are already signed in' } as const; throw redirect('/', message, event); } + return { form }; @@ -27,6 +28,7 @@ export const load: PageServerLoad = async (event) => { export const actions: Actions = { default: async (event) => { + const { cookies, locals } = event; const form = await superValidate(event, signInSchema); if (!form.valid) { @@ -36,56 +38,63 @@ export const actions: Actions = { }); } + let session; + let sessionCookie; try { - const key = await auth.useKey('username', form.data.username, form.data.password); - const session = await auth.createSession({ - userId: key.userId, - attributes: {} - }); - event.locals.auth.setSession(session); + const password = form.data.password; const user = await prisma.user.findUnique({ where: { - id: session.user.userId - }, - include: { - roles: { - select: { - role: true - } - } + username: form.data.username } }); - if (user) { - await prisma.collection.upsert({ - where: { - user_id: user.id - }, - create: { - user_id: user.id - }, - update: { - user_id: user.id - } - }); - await prisma.wishlist.upsert({ - where: { - user_id: user.id - }, - create: { - user_id: user.id - }, - update: { - user_id: user.id - } - }); + + if (!user || !user.hashed_password) { + form.data.password = ''; + return setError(form, '', 'Your username or password is incorrect.'); } + + const validPassword = await new Argon2id().verify(user.hashed_password, password); + if (!validPassword) { + form.data.password = ''; + return setError(form, '', 'Your username or password is incorrect.'); + } + + session = await lucia.createSession(user.id, { + country: locals.session.ip, + }); + sessionCookie = lucia.createSessionCookie(session.id); + + await prisma.collection.upsert({ + where: { + user_id: user.id + }, + create: { + user_id: user.id + }, + update: { + user_id: user.id + } + }); + await prisma.wishlist.upsert({ + where: { + user_id: user.id + }, + create: { + user_id: user.id + }, + update: { + user_id: user.id + } + }); } catch (e) { // TODO: need to return error message to the client console.error(e); form.data.password = ''; return setError(form, '', 'Your username or password is incorrect.'); } + + event.cookies.set(sessionCookie.name, sessionCookie.value, sessionCookie.attributes); form.data.username = ''; form.data.password = ''; const message = { type: 'success', message: 'Signed In!' }; diff --git a/src/routes/(auth)/logout/+page.server.ts b/src/routes/(auth)/logout/+page.server.ts index b7b002d..03a07e8 100644 --- a/src/routes/(auth)/logout/+page.server.ts +++ b/src/routes/(auth)/logout/+page.server.ts @@ -1,15 +1,15 @@ import { redirect, type Actions } from '@sveltejs/kit'; -import { auth } from '$lib/server/lucia'; +import { lucia } from '$lib/server/auth'; export const actions: Actions = { - default: async ({ locals }) => { + default: async ({ locals, cookies }) => { console.log('Signing out user'); - const session = await locals.auth.validate(); - if (!session) { + const sessionId = cookies.get(lucia.sessionCookieName); + if (!locals.user || !sessionId) { throw redirect(302, '/login'); } - await auth.invalidateSession(session.sessionId); // invalidate session - locals.auth.setSession(null); // remove cookie + await lucia.invalidateSession(sessionId); + // locals.auth.setSession(null); // remove cookie throw redirect(302, '/'); } }; diff --git a/src/routes/(auth)/sign-up/+page.server.ts b/src/routes/(auth)/sign-up/+page.server.ts index 3b082d3..4f14e50 100644 --- a/src/routes/(auth)/sign-up/+page.server.ts +++ b/src/routes/(auth)/sign-up/+page.server.ts @@ -1,9 +1,9 @@ import {fail, error, type Actions, redirect} from '@sveltejs/kit'; import { superValidate } from 'sveltekit-superforms/server'; -import { LuciaError } from 'lucia'; import type { PageServerLoad } from './$types'; import prisma from '$lib/prisma'; -import { auth } from '$lib/server/lucia'; +import { lucia } from '$lib/server/auth'; +import { Argon2id } from 'oslo/password'; import { userSchema } from '$lib/config/zod-schemas'; import { add_user_to_role } from '$server/roles'; import type { Message } from '$lib/types.js'; @@ -41,8 +41,8 @@ export const load: PageServerLoad = async (event) => { export const actions: Actions = { default: async (event) => { + const { cookies } = event; const form = await superValidate(event, signUpSchema); - debugger; if (!form.valid) { form.data.password = ''; form.data.confirm_password = ''; @@ -51,50 +51,47 @@ export const actions: Actions = { }); } + let session; + let sessionCookie; // Adding user to the db try { console.log('Creating user'); - const token = crypto.randomUUID(); - const user = await auth.createUser({ - key: { - providerId: 'username', - providerUserId: form.data.username, - password: form.data.password - }, - attributes: { - email: form.data.email || null, + const hashedPassword = await new Argon2id().hash(form.data.password); + + const user = await prisma.user.create({ + data: { username: form.data.username, + hashed_password: hashedPassword, + email: form.data.email || '', firstName: form.data.firstName || '', lastName: form.data.lastName || '', verified: false, receiveEmail: false, - theme: 'system', - token + theme: 'system' } }); console.log('signup user', user); - add_user_to_role(user.userId, 'user'); + add_user_to_role(user.id, 'user'); await prisma.collection.create({ data: { - user_id: user.userId + user_id: user.id } }); await prisma.wishlist.create({ data: { - user_id: user.userId + user_id: user.id } }); console.log('User', user); - const session = await auth.createSession({ - userId: user.userId, - attributes: {} + session = await lucia.createSession(user.id, { + country: event.locals.session.country }); - event.locals.auth.setSession(session); - } catch (e) { - if (e instanceof LuciaError && e.message.toUpperCase() === `DUPLICATE_KEY_ID`) { + sessionCookie = lucia.createSessionCookie(session.id); + } catch (e: any) { + if (e.message.toUpperCase() === `DUPLICATE_KEY_ID`) { // key already exists console.error('Lucia Error: ', e); } @@ -107,6 +104,8 @@ export const actions: Actions = { form.data.confirm_password = ''; throw error(500, message); } + + event.cookies.set(sessionCookie.name, sessionCookie.value, sessionCookie.attributes); throw redirect(302, '/'); // const message = { type: 'success', message: 'Signed Up!' } as const; // throw flashRedirect(message, event); diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 8295704..9ba4fd5 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -110,7 +110,7 @@ {/if} - +