A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
deps: Upgrade drizzle and next auth drizzle adapter
MohamedBassem80749d532794
diff --git a/apps/web/package.json b/apps/web/package.jsonindex ade09a83..62d706cd 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -15,7 +15,7 @@"format": "prettier --check . --ignore-path ../../.gitignore"},"dependencies": {- "@auth/drizzle-adapter": "^0.8.0",+ "@auth/drizzle-adapter": "^1.4.2","@emoji-mart/data": "^1.1.2","@emoji-mart/react": "^1.1.1","@hoarder/db": "workspace:^0.1.0",@@ -46,7 +46,7 @@"class-variance-authority": "^0.7.0","clsx": "^2.1.0","dayjs": "^1.11.10",- "drizzle-orm": "^0.29.4",+ "drizzle-orm": "^0.33.0","fastest-levenshtein": "^1.0.16","lucide-react": "^0.330.0","next": "14.1.4",diff --git a/apps/web/server/auth.ts b/apps/web/server/auth.tsindex acc3745c..2ab44d5a 100644--- a/apps/web/server/auth.ts+++ b/apps/web/server/auth.ts@@ -9,6 +9,12 @@ import CredentialsProvider from "next-auth/providers/credentials";import { Provider } from "next-auth/providers/index";import { db } from "@hoarder/db";+import {+ accounts,+ sessions,+ users,+ verificationTokens,+} from "@hoarder/db/schema";import { validatePassword } from "@hoarder/trpc/auth";declare module "next-auth/jwt" {@@ -63,7 +69,12 @@ const providers: Provider[] = [export const authOptions: NextAuthOptions = {// https://github.com/nextauthjs/next-auth/issues/9493- adapter: DrizzleAdapter(db) as Adapter,+ adapter: DrizzleAdapter(db, {+ usersTable: users,+ accountsTable: accounts,+ sessionsTable: sessions,+ verificationTokensTable: verificationTokens,+ }) as Adapter,providers: providers,session: {strategy: "jwt",diff --git a/apps/workers/package.json b/apps/workers/package.jsonindex 74a934bd..bbd5b17d 100644--- a/apps/workers/package.json+++ b/apps/workers/package.json@@ -13,7 +13,7 @@"async-mutex": "^0.4.1","dompurify": "^3.0.9","dotenv": "^16.4.1",- "drizzle-orm": "^0.29.4",+ "drizzle-orm": "^0.33.0","execa": "^9.1.0","jsdom": "^24.0.0","metascraper": "^5.43.4",diff --git a/packages/db/package.json b/packages/db/package.jsonindex 85e91e1f..2335d1f8 100644--- a/packages/db/package.json+++ b/packages/db/package.json@@ -15,7 +15,7 @@"@paralleldrive/cuid2": "^2.2.2","better-sqlite3": "^9.4.3","dotenv": "^16.4.1",- "drizzle-orm": "^0.29.4",+ "drizzle-orm": "^0.33.0","tsx": "^4.7.1"},"devDependencies": {diff --git a/packages/queue/package.json b/packages/queue/package.jsonindex d7c21b56..a5d648e3 100644--- a/packages/queue/package.json+++ b/packages/queue/package.json@@ -7,7 +7,7 @@"dependencies": {"async-mutex": "^0.4.1","better-sqlite3": "^9.4.3",- "drizzle-orm": "^0.29.4",+ "drizzle-orm": "^0.33.0","zod": "^3.22.4"},"devDependencies": {diff --git a/packages/trpc/package.json b/packages/trpc/package.jsonindex ec858ca5..9174a98d 100644--- a/packages/trpc/package.json+++ b/packages/trpc/package.json@@ -15,7 +15,7 @@"@hoarder/shared": "workspace:*","@trpc/server": "11.0.0-next-beta.308","bcryptjs": "^2.4.3",- "drizzle-orm": "^0.29.4",+ "drizzle-orm": "^0.33.0","superjson": "^2.2.1","tiny-invariant": "^1.3.3","zod": "^3.22.4"diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 7e504c47..832ee798 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -458,8 +458,8 @@ importers:apps/web:dependencies:'@auth/drizzle-adapter':- specifier: ^0.8.0- version: 0.8.0+ specifier: ^1.4.2+ version: 1.4.2'@emoji-mart/data':specifier: ^1.1.2version: 1.1.2@@ -551,8 +551,8 @@ importers:specifier: ^1.11.10version: 1.11.10drizzle-orm:- specifier: ^0.29.4+ specifier: ^0.33.0fastest-levenshtein:specifier: ^1.0.16version: 1.0.16@@ -690,8 +690,8 @@ importers:specifier: ^16.4.1version: 16.4.5drizzle-orm:- specifier: ^0.29.4+ specifier: ^0.33.0execa:specifier: ^9.1.0version: 9.1.0@@ -833,8 +833,8 @@ importers:specifier: ^16.4.1version: 16.4.5drizzle-orm:- specifier: ^0.29.4- version: 0.29.4(@types/[email protected])([email protected])+ specifier: ^0.33.0+ version: 0.33.0(@types/[email protected])([email protected])tsx:specifier: ^4.7.1version: 4.7.1@@ -867,8 +867,8 @@ importers:specifier: ^9.4.3version: 9.4.3drizzle-orm:- specifier: ^0.29.4- version: 0.29.4(@types/[email protected])([email protected])+ specifier: ^0.33.0+ version: 0.33.0(@types/[email protected])([email protected])zod:specifier: ^3.22.4version: 3.22.4@@ -969,8 +969,8 @@ importers:specifier: ^2.4.3version: 2.4.3drizzle-orm:- specifier: ^0.29.4+ specifier: ^0.33.0superjson:specifier: ^2.2.1version: 2.2.1@@ -1209,8 +1209,8 @@ packages:nodemailer:optional: true- '@auth/[email protected]':- resolution: {integrity: sha512-/fh/tb/L4NMSYcyPoo4Imn8vN6MskcVfgESF8/ndgtI4fhD/7u7i5fTVzWgNRZ4ebIEGHNDbWFRxaTu1NtQgvA==}+ '@auth/[email protected]':+ resolution: {integrity: sha512-KywHKRgLiF3l7PLyL73fjLSIBe1YNcA6sMeew4yMP6cfCWGXZrkkXd32AjRi1hlJ9nvovUBGZHvbn+LijO6ZeQ==}peerDependencies:'@simplewebauthn/browser': ^9.0.1'@simplewebauthn/server': ^9.0.2@@ -1223,8 +1223,8 @@ packages:nodemailer:optional: true- '@auth/[email protected]':- resolution: {integrity: sha512-cwLMOJHf+R8VeHYFzdA5DReKelidWSx8bz9kJ6hydPjUugHate2F7u9XHoCOu7zXIA5azSPb3b2WR9C0Fjq7eA==}+ '@auth/[email protected]':+ resolution: {integrity: sha512-rqukaT9CeWB8VOt6g2bQ6uYMHVOQIYCBkzddZXWshi8aqwLABatpRWAc+pehpcMDn0RSW/uvKMs7tkON+Bho9Q==}'@babel/[email protected]':resolution: {integrity: sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==}@@ -6083,20 +6083,25 @@ packages:resolution: {integrity: sha512-0fHv3YIEaUcSVPSGyaaBfOi9bmpajjhbJNdPsRMIUvYdLVxBu9eGjH8mRc3Qk7HVmEidFc/lhG1YyJhoXrn5yA==}hasBin: true- resolution: {integrity: sha512-ZnSM8TAxFhzH7p1s3+w3pRE/eKaOeNkH9SKitm717pubDVVcV2I0BCDBPGKV+pe02+wMfw37ntlTcCyo2rA3IA==}+ resolution: {integrity: sha512-SHy72R2Rdkz0LEq0PSG/IdvnT3nGiWuRk+2tXZQ90GVq/XQhpCzu/EFT3V2rox+w8MlkBQxifF8pCStNYnERfA==}peerDependencies:'@aws-sdk/client-rds-data': '>=3''@cloudflare/workers-types': '>=3'+ '@electric-sql/pglite': '>=0.1.1''@libsql/client': '*''@neondatabase/serverless': '>=0.1'+ '@op-engineering/op-sqlite': '>=2''@opentelemetry/api': ^1.4.1'@planetscale/database': '>=1'+ '@prisma/client': '*'+ '@tidbcloud/serverless': '*''@types/better-sqlite3': '*''@types/pg': '*''@types/react': '>=18''@types/sql.js': '*'- '@vercel/postgres': '*'+ '@vercel/postgres': '>=0.8.0'+ '@xata.io/client': '*'better-sqlite3: '>=7'bun-types: '*'expo-sqlite: '>=13.2.0'@@ -6105,6 +6110,7 @@ packages:mysql2: '>=2'pg: '>=8'postgres: '>=3'+ prisma: '*'react: '>=18'sql.js: '>=1'sqlite3: '>=5'@@ -6113,14 +6119,22 @@ packages:optional: true'@cloudflare/workers-types':optional: true+ '@electric-sql/pglite':+ optional: true'@libsql/client':optional: true'@neondatabase/serverless':optional: true+ '@op-engineering/op-sqlite':+ optional: true'@opentelemetry/api':optional: true'@planetscale/database':optional: true+ '@prisma/client':+ optional: true+ '@tidbcloud/serverless':+ optional: true'@types/better-sqlite3':optional: true'@types/pg':@@ -6131,6 +6145,8 @@ packages:optional: true'@vercel/postgres':optional: true+ '@xata.io/client':+ optional: truebetter-sqlite3:optional: truebun-types:@@ -6147,6 +6163,8 @@ packages:optional: truepostgres:optional: true+ prisma:+ optional: truereact:optional: truesql.js:@@ -9236,6 +9254,9 @@ packages:resolution: {integrity: sha512-9FkXEXfzVKzH63GUOZz1zMr3wBaICSzk6DLXx+CGdrQ10ItNk2ePWzYYc1fdmKq1ayGFb2aX97sRCoZ2s0mkDw==}+ resolution: {integrity: sha512-OuKZgPrt4qKFrLAhStRVU/aPbLYtIZufjO52bYdP45JXpBYhipvFvpgBFi4DONGByUVOiWuqkclTKaDfZShspA==}+resolution: {integrity: sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==}@@ -12642,20 +12663,20 @@ snapshots:preact-render-to-string: 5.2.3([email protected])dev: false- '@auth/[email protected]':+ '@auth/[email protected]':dependencies:'@panva/hkdf': 1.1.1'@types/cookie': 0.6.0cookie: 0.6.0jose: 5.2.2- oauth4webapi: 2.10.3+ oauth4webapi: 2.14.0preact: 10.11.3preact-render-to-string: 5.2.3([email protected])dev: false- '@auth/[email protected]':+ '@auth/[email protected]':dependencies:- '@auth/core': 0.28.0+ '@auth/core': 0.34.2transitivePeerDependencies:- '@simplewebauthn/browser'- '@simplewebauthn/server'@@ -13134,7 +13155,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -13308,7 +13329,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -13320,7 +13341,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -13332,7 +13353,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -13356,7 +13377,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -13437,7 +13458,7 @@ snapshots:dependencies:'@babel/core': 7.23.9'@babel/helper-module-imports': 7.22.15- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0'@babel/helper-remap-async-to-generator': 7.22.20(@babel/[email protected])dev: false@@ -13464,7 +13485,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -13510,7 +13531,7 @@ snapshots:'@babel/helper-compilation-targets': 7.23.6'@babel/helper-environment-visitor': 7.22.20'@babel/helper-function-name': 7.23.0- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0'@babel/helper-replace-supers': 7.22.20(@babel/[email protected])'@babel/helper-split-export-declaration': 7.22.6globals: 11.12.0@@ -13532,7 +13553,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0'@babel/template': 7.24.0dev: false@@ -13546,7 +13567,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -13656,7 +13677,7 @@ snapshots:'@babel/core': 7.23.9'@babel/helper-compilation-targets': 7.23.6'@babel/helper-function-name': 7.23.0- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -13684,7 +13705,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -13737,7 +13758,7 @@ snapshots:dependencies:'@babel/core': 7.23.9'@babel/helper-module-transforms': 7.23.3(@babel/[email protected])- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0'@babel/helper-simple-access': 7.22.5dev: false@@ -13785,7 +13806,7 @@ snapshots:dependencies:'@babel/core': 7.23.9'@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -13930,7 +13951,7 @@ snapshots:'@babel/core': 7.23.9'@babel/helper-annotate-as-pure': 7.22.5'@babel/helper-create-class-features-plugin': 7.24.0(@babel/[email protected])- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0'@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/[email protected])dev: false@@ -13964,7 +13985,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -14014,7 +14035,7 @@ snapshots:'@babel/core': 7.23.9'@babel/helper-annotate-as-pure': 7.22.5'@babel/helper-module-imports': 7.22.15- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0'@babel/plugin-syntax-jsx': 7.23.3(@babel/[email protected])'@babel/types': 7.24.0dev: false@@ -14033,7 +14054,7 @@ snapshots:dependencies:'@babel/core': 7.23.9'@babel/helper-annotate-as-pure': 7.22.5- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -14110,7 +14131,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0'@babel/helper-skip-transparent-expression-wrappers': 7.22.5dev: false@@ -14124,7 +14145,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -14205,7 +14226,7 @@ snapshots:dependencies:'@babel/core': 7.23.9'@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/[email protected])- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0dev: false'@babel/[email protected](@babel/[email protected])':@@ -14430,7 +14451,7 @@ snapshots:'@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.23.9- '@babel/helper-plugin-utils': 7.24.8+ '@babel/helper-plugin-utils': 7.24.0'@babel/helper-validator-option': 7.23.5'@babel/plugin-transform-react-display-name': 7.23.3(@babel/[email protected])'@babel/plugin-transform-react-jsx': 7.23.4(@babel/[email protected])@@ -20724,13 +20745,13 @@ snapshots:- supports-colordev: truedependencies:'@types/better-sqlite3': 7.6.9better-sqlite3: 9.4.3dev: falsedependencies:'@types/react': 18.2.58better-sqlite3: 9.4.3@@ -25301,6 +25322,9 @@ snapshots:dev: false+ dev: false+dev: false