diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0178734..52cbde0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -40,7 +40,7 @@ jobs: ${{ runner.os }}-pnpm-store- - name: Run security audit - run: pnpm audit + run: pnpm audit --audit-level moderate --prod - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/package.json b/package.json index 8317519..2f687df 100755 --- a/package.json +++ b/package.json @@ -27,12 +27,12 @@ "@nanostores/react": "^1.0.0", "@tabler/icons-react": "^3.35.0", "axios": "^1.12.2", - "better-auth": "^1.3.28", + "better-auth": "^1.4.2", "dotenv": "^17.2.3", "envalid": "^8.1.0", "mysql2": "^3.15.2", "nanostores": "^1.0.1", - "next": "15.5.6", + "next": "^15.5.9", "react": "19.1.0", "react-dom": "19.1.0", "supersave": "^0.20.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ad59b47..fd4675b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,11 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + body-parser@>=2.2.0 <2.2.1: '>=2.2.1' + mdast-util-to-hast@>=13.0.0 <13.2.1: '>=13.2.1' + qs@<6.14.1: '>=6.14.1' + importers: .: dependencies: @@ -41,8 +46,8 @@ importers: specifier: ^1.12.2 version: 1.12.2 better-auth: - specifier: ^1.3.28 - version: 1.3.29(next@15.5.6(@babel/core@7.28.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + specifier: ^1.4.2 + version: 1.4.12(better-sqlite3@12.4.1)(mysql2@3.15.3)(next@15.5.9(@babel/core@7.28.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) dotenv: specifier: ^17.2.3 version: 17.2.3 @@ -56,8 +61,8 @@ importers: specifier: ^1.0.1 version: 1.0.1 next: - specifier: 15.5.6 - version: 15.5.6(@babel/core@7.28.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + specifier: ^15.5.9 + version: 15.5.9(@babel/core@7.28.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) react: specifier: 19.1.0 version: 19.1.0 @@ -227,28 +232,30 @@ packages: { integrity: sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q== } engines: { node: '>=6.9.0' } - '@better-auth/core@1.3.29': + '@better-auth/core@1.4.12': resolution: - { integrity: sha512-Ka2mg4qZACFaLY7DOGFXv1Ma8CkF17k0ClUd2U/ZJbbSoEPI5gnVguEmakJB6HFYswszeZh2295IFORtW9wf7A== } + { integrity: sha512-VfqZwMAEl9rnGx092BIZ2Q5z8rt7jjN2OAbvPqehufSKZGmh8JsdtZRBMl/CHQir9bwi2Ev0UF4+7TQp+DXEMg== } peerDependencies: '@better-auth/utils': 0.3.0 - '@better-fetch/fetch': 1.1.18 - better-call: 1.0.19 + '@better-fetch/fetch': 1.1.21 + better-call: 1.1.7 jose: ^6.1.0 kysely: ^0.28.5 nanostores: ^1.0.1 - '@better-auth/telemetry@1.3.29': + '@better-auth/telemetry@1.4.12': resolution: - { integrity: sha512-1BFh3YulYDrwWcUkfEWddcrcApACyI4wtrgq3NBd9y+tilBRjWTCWEPuRqJrfM3a5F1ZSqsvOYfFG1XZbkxlVw== } + { integrity: sha512-4q504Og42PzkUbZjXDt+FyeYaS0WZmAlEOC3nbBCZDObTVCRUnGgJW52B2maJ7BCVvAQgBGLEeQmQzU5+63J0A== } + peerDependencies: + '@better-auth/core': 1.4.12 '@better-auth/utils@0.3.0': resolution: { integrity: sha512-W+Adw6ZA6mgvnSnhOki270rwJ42t4XzSK6YWGF//BbVXL6SwCLWfyzBc1lN2m/4RM28KubdBKQ4X5VMoLRNPQw== } - '@better-fetch/fetch@1.1.18': + '@better-fetch/fetch@1.1.21': resolution: - { integrity: sha512-rEFOE1MYIsBmoMJtQbl32PGHHXuG2hDxvEd7rUHE0vCBoFQVSDqaVs9hkZEtHCxRoY+CljXKFCOuJ8uxqw1LcA== } + { integrity: sha512-/ImESw0sskqlVR94jB+5+Pxjf+xBwDZF/N5+y2/q4EqD7IARUTSpPfIo8uf39SYpCxyOCtbyYpUrZ3F/k0zT4A== } '@blocknote/core@0.41.1': resolution: @@ -470,10 +477,6 @@ packages: resolution: { integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ== } - '@hexagon/base64@1.1.28': - resolution: - { integrity: sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw== } - '@humanfs/core@0.19.1': resolution: { integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== } @@ -693,10 +696,6 @@ packages: resolution: { integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== } - '@levischuck/tiny-cbor@0.2.11': - resolution: - { integrity: sha512-llBRm4dT4Z89aRsm6u2oEZ8tfwL/2l6BwpZ7JcyieouniDECM5AqNgr/y08zalEIvW3RSK4upYyybDcmjXqAow== } - '@mantine/core@8.3.5': resolution: { integrity: sha512-PdVNLMgOS2vFhOujRi6/VC9ic8w3UDyKX7ftwDeJ7yQT8CiepUxfbWWYpVpnq23bdWh/7fIT2Pn1EY8r8GOk7g== } @@ -759,70 +758,70 @@ packages: resolution: { integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ== } - '@next/env@15.5.6': + '@next/env@15.5.9': resolution: - { integrity: sha512-3qBGRW+sCGzgbpc5TS1a0p7eNxnOarGVQhZxfvTdnV0gFI61lX7QNtQ4V1TSREctXzYn5NetbUsLvyqwLFJM6Q== } + { integrity: sha512-4GlTZ+EJM7WaW2HEZcyU317tIQDjkQIyENDLxYJfSWlfqguN+dHkZgyQTV/7ykvobU7yEH5gKvreNrH4B6QgIg== } '@next/eslint-plugin-next@15.5.6': resolution: { integrity: sha512-YxDvsT2fwy1j5gMqk3ppXlsgDopHnkM4BoxSVASbvvgh5zgsK8lvWerDzPip8k3WVzsTZ1O7A7si1KNfN4OZfQ== } - '@next/swc-darwin-arm64@15.5.6': + '@next/swc-darwin-arm64@15.5.7': resolution: - { integrity: sha512-ES3nRz7N+L5Umz4KoGfZ4XX6gwHplwPhioVRc25+QNsDa7RtUF/z8wJcbuQ2Tffm5RZwuN2A063eapoJ1u4nPg== } + { integrity: sha512-IZwtxCEpI91HVU/rAUOOobWSZv4P2DeTtNaCdHqLcTJU4wdNXgAySvKa/qJCgR5m6KI8UsKDXtO2B31jcaw1Yw== } engines: { node: '>= 10' } cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@15.5.6': + '@next/swc-darwin-x64@15.5.7': resolution: - { integrity: sha512-JIGcytAyk9LQp2/nuVZPAtj8uaJ/zZhsKOASTjxDug0SPU9LAM3wy6nPU735M1OqacR4U20LHVF5v5Wnl9ptTA== } + { integrity: sha512-UP6CaDBcqaCBuiq/gfCEJw7sPEoX1aIjZHnBWN9v9qYHQdMKvCKcAVs4OX1vIjeE+tC5EIuwDTVIoXpUes29lg== } engines: { node: '>= 10' } cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@15.5.6': + '@next/swc-linux-arm64-gnu@15.5.7': resolution: - { integrity: sha512-qvz4SVKQ0P3/Im9zcS2RmfFL/UCQnsJKJwQSkissbngnB/12c6bZTCB0gHTexz1s6d/mD0+egPKXAIRFVS7hQg== } + { integrity: sha512-NCslw3GrNIw7OgmRBxHtdWFQYhexoUCq+0oS2ccjyYLtcn1SzGzeM54jpTFonIMUjNbHmpKpziXnpxhSWLcmBA== } engines: { node: '>= 10' } cpu: [arm64] os: [linux] libc: [glibc] - '@next/swc-linux-arm64-musl@15.5.6': + '@next/swc-linux-arm64-musl@15.5.7': resolution: - { integrity: sha512-FsbGVw3SJz1hZlvnWD+T6GFgV9/NYDeLTNQB2MXoPN5u9VA9OEDy6fJEfePfsUKAhJufFbZLgp0cPxMuV6SV0w== } + { integrity: sha512-nfymt+SE5cvtTrG9u1wdoxBr9bVB7mtKTcj0ltRn6gkP/2Nu1zM5ei8rwP9qKQP0Y//umK+TtkKgNtfboBxRrw== } engines: { node: '>= 10' } cpu: [arm64] os: [linux] libc: [musl] - '@next/swc-linux-x64-gnu@15.5.6': + '@next/swc-linux-x64-gnu@15.5.7': resolution: - { integrity: sha512-3QnHGFWlnvAgyxFxt2Ny8PTpXtQD7kVEeaFat5oPAHHI192WKYB+VIKZijtHLGdBBvc16tiAkPTDmQNOQ0dyrA== } + { integrity: sha512-hvXcZvCaaEbCZcVzcY7E1uXN9xWZfFvkNHwbe/n4OkRhFWrs1J1QV+4U1BN06tXLdaS4DazEGXwgqnu/VMcmqw== } engines: { node: '>= 10' } cpu: [x64] os: [linux] libc: [glibc] - '@next/swc-linux-x64-musl@15.5.6': + '@next/swc-linux-x64-musl@15.5.7': resolution: - { integrity: sha512-OsGX148sL+TqMK9YFaPFPoIaJKbFJJxFzkXZljIgA9hjMjdruKht6xDCEv1HLtlLNfkx3c5w2GLKhj7veBQizQ== } + { integrity: sha512-4IUO539b8FmF0odY6/SqANJdgwn1xs1GkPO5doZugwZ3ETF6JUdckk7RGmsfSf7ws8Qb2YB5It33mvNL/0acqA== } engines: { node: '>= 10' } cpu: [x64] os: [linux] libc: [musl] - '@next/swc-win32-arm64-msvc@15.5.6': + '@next/swc-win32-arm64-msvc@15.5.7': resolution: - { integrity: sha512-ONOMrqWxdzXDJNh2n60H6gGyKed42Ieu6UTVPZteXpuKbLZTH4G4eBMsr5qWgOBA+s7F+uB4OJbZnrkEDnZ5Fg== } + { integrity: sha512-CpJVTkYI3ZajQkC5vajM7/ApKJUOlm6uP4BknM3XKvJ7VXAvCqSjSLmM0LKdYzn6nBJVSjdclx8nYJSa3xlTgQ== } engines: { node: '>= 10' } cpu: [arm64] os: [win32] - '@next/swc-win32-x64-msvc@15.5.6': + '@next/swc-win32-x64-msvc@15.5.7': resolution: - { integrity: sha512-pxK4VIjFRx1MY92UycLOOw7dTdvccWsNETQ0kDHkBlcFH1GrTLUjSiHU1ohrznnux6TqRHgv5oflhfIWZwVROQ== } + { integrity: sha512-gMzgBX164I6DN+9/PGA+9dQiwmTkE4TloBNx8Kv9UiGARsr9Nba7IpcBRA1iTV9vwlYnrE3Uy6I7Aj6qLjQuqw== } engines: { node: '>= 10' } cpu: [x64] os: [win32] @@ -857,54 +856,6 @@ packages: { integrity: sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA== } engines: { node: '>=12.4.0' } - '@peculiar/asn1-android@2.5.0': - resolution: - { integrity: sha512-t8A83hgghWQkcneRsgGs2ebAlRe54ns88p7ouv8PW2tzF1nAW4yHcL4uZKrFpIU+uszIRzTkcCuie37gpkId0A== } - - '@peculiar/asn1-cms@2.5.0': - resolution: - { integrity: sha512-p0SjJ3TuuleIvjPM4aYfvYw8Fk1Hn/zAVyPJZTtZ2eE9/MIer6/18ROxX6N/e6edVSfvuZBqhxAj3YgsmSjQ/A== } - - '@peculiar/asn1-csr@2.5.0': - resolution: - { integrity: sha512-ioigvA6WSYN9h/YssMmmoIwgl3RvZlAYx4A/9jD2qaqXZwGcNlAxaw54eSx2QG1Yu7YyBC5Rku3nNoHrQ16YsQ== } - - '@peculiar/asn1-ecc@2.5.0': - resolution: - { integrity: sha512-t4eYGNhXtLRxaP50h3sfO6aJebUCDGQACoeexcelL4roMFRRVgB20yBIu2LxsPh/tdW9I282gNgMOyg3ywg/mg== } - - '@peculiar/asn1-pfx@2.5.0': - resolution: - { integrity: sha512-Vj0d0wxJZA+Ztqfb7W+/iu8Uasw6hhKtCdLKXLG/P3kEPIQpqGI4P4YXlROfl7gOCqFIbgsj1HzFIFwQ5s20ug== } - - '@peculiar/asn1-pkcs8@2.5.0': - resolution: - { integrity: sha512-L7599HTI2SLlitlpEP8oAPaJgYssByI4eCwQq2C9eC90otFpm8MRn66PpbKviweAlhinWQ3ZjDD2KIVtx7PaVw== } - - '@peculiar/asn1-pkcs9@2.5.0': - resolution: - { integrity: sha512-UgqSMBLNLR5TzEZ5ZzxR45Nk6VJrammxd60WMSkofyNzd3DQLSNycGWSK5Xg3UTYbXcDFyG8pA/7/y/ztVCa6A== } - - '@peculiar/asn1-rsa@2.5.0': - resolution: - { integrity: sha512-qMZ/vweiTHy9syrkkqWFvbT3eLoedvamcUdnnvwyyUNv5FgFXA3KP8td+ATibnlZ0EANW5PYRm8E6MJzEB/72Q== } - - '@peculiar/asn1-schema@2.5.0': - resolution: - { integrity: sha512-YM/nFfskFJSlHqv59ed6dZlLZqtZQwjRVJ4bBAiWV08Oc+1rSd5lDZcBEx0lGDHfSoH3UziI2pXt2UM33KerPQ== } - - '@peculiar/asn1-x509-attr@2.5.0': - resolution: - { integrity: sha512-9f0hPOxiJDoG/bfNLAFven+Bd4gwz/VzrCIIWc1025LEI4BXO0U5fOCTNDPbbp2ll+UzqKsZ3g61mpBp74gk9A== } - - '@peculiar/asn1-x509@2.5.0': - resolution: - { integrity: sha512-CpwtMCTJvfvYTFMuiME5IH+8qmDe3yEWzKHe7OOADbGfq7ohxeLaXwQo0q4du3qs0AII3UbLCvb9NF/6q0oTKQ== } - - '@peculiar/x509@1.14.0': - resolution: - { integrity: sha512-Yc4PDxN3OrxUPiXgU63c+ZRXKGE8YKF2McTciYhUHFtHVB0KMnjeFSU0qpztGhsp4P0uKix4+J2xEpIEDu8oXg== } - '@remirror/core-constants@3.0.0': resolution: { integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg== } @@ -925,19 +876,14 @@ packages: resolution: { integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg== } - '@simplewebauthn/browser@13.2.2': - resolution: - { integrity: sha512-FNW1oLQpTJyqG5kkDg5ZsotvWgmBaC6jCHR7Ej0qUNep36Wl9tj2eZu7J5rP+uhXgHaLk+QQ3lqcw2vS5MX1IA== } - - '@simplewebauthn/server@13.2.2': - resolution: - { integrity: sha512-HcWLW28yTMGXpwE9VLx9J+N2KEUaELadLrkPEEI9tpI5la70xNEVEsu/C+m3u7uoq4FulLqZQhgBCzR9IZhFpA== } - engines: { node: '>=20.0.0' } - '@so-ric/colorspace@1.1.6': resolution: { integrity: sha512-/KiKkpHNOBgkFJwu9sh48LkHSMYGyuTcSFK/qMBdnOAlrRJzRSXAOFB5qwzaVQuDl8wAvHVMkaASQDReTahxuw== } + '@standard-schema/spec@1.1.0': + resolution: + { integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w== } + '@swc/helpers@0.5.15': resolution: { integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g== } @@ -1448,11 +1394,6 @@ packages: { integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ== } engines: { node: '>= 0.4' } - asn1js@3.0.6: - resolution: - { integrity: sha512-UOCGPYbl0tv8+006qks/dTgV9ajs97X2p0FAbyS2iyCRrmLSRolDaHdp+v/CLgnzHc3fVB+CwYiUmei7ndFcgA== } - engines: { node: '>=12.0.0' } - ast-types-flow@0.0.8: resolution: { integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ== } @@ -1511,25 +1452,53 @@ packages: { integrity: sha512-zoKGUdu6vb2jd3YOq0nnhEDQVbPcHhco3UImJrv5dSkvxTc2pl2WjOPsjZXDwPDSl5eghIMuY3R6J9NDKF3KcQ== } hasBin: true - better-auth@1.3.29: + better-auth@1.4.12: resolution: - { integrity: sha512-1va1XZLTQme3DX33PgHqwwVyOJya5H0+ozT6BhOjTnwecC50I75F0OqqTwINq4XZ0+GuD3bl3I55RiFP49jStw== } + { integrity: sha512-FsFMnWgk+AGrxsIGbpWLCibgYcbm6uNhPHln3ohXFDXSRa0gk39Beuh54Q+x6ml2qYodF0snxf/tPtDpBI/JiA== } peerDependencies: '@lynx-js/react': '*' - '@sveltejs/kit': '*' - next: '*' - react: '*' - react-dom: '*' - solid-js: '*' - svelte: '*' - vue: '*' + '@prisma/client': ^5.0.0 || ^6.0.0 || ^7.0.0 + '@sveltejs/kit': ^2.0.0 + '@tanstack/react-start': ^1.0.0 + better-sqlite3: ^12.0.0 + drizzle-kit: '>=0.31.4' + drizzle-orm: '>=0.41.0' + mongodb: ^6.0.0 || ^7.0.0 + mysql2: ^3.0.0 + next: ^14.0.0 || ^15.0.0 || ^16.0.0 + pg: ^8.0.0 + prisma: ^5.0.0 || ^6.0.0 || ^7.0.0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + solid-js: ^1.0.0 + svelte: ^4.0.0 || ^5.0.0 + vitest: ^2.0.0 || ^3.0.0 || ^4.0.0 + vue: ^3.0.0 peerDependenciesMeta: '@lynx-js/react': optional: true + '@prisma/client': + optional: true '@sveltejs/kit': optional: true + '@tanstack/react-start': + optional: true + better-sqlite3: + optional: true + drizzle-kit: + optional: true + drizzle-orm: + optional: true + mongodb: + optional: true + mysql2: + optional: true next: optional: true + pg: + optional: true + prisma: + optional: true react: optional: true react-dom: @@ -1538,12 +1507,19 @@ packages: optional: true svelte: optional: true + vitest: + optional: true vue: optional: true - better-call@1.0.19: + better-call@1.1.7: resolution: - { integrity: sha512-sI3GcA1SCVa3H+CDHl8W8qzhlrckwXOTKhqq3OOPXjgn5aTOMIqGY34zLY/pHA6tRRMjTUC3lz5Mi7EbDA24Kw== } + { integrity: sha512-6gaJe1bBIEgVebQu/7q9saahVzvBsGaByEnE8aDVncZEDiJO7sdNB28ot9I6iXSbR25egGmmZ6aIURXyQHRraQ== } + peerDependencies: + zod: ^4.0.0 + peerDependenciesMeta: + zod: + optional: true better-sqlite3@12.4.1: resolution: @@ -1558,9 +1534,9 @@ packages: resolution: { integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== } - body-parser@2.2.0: + body-parser@2.2.2: resolution: - { integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg== } + { integrity: sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA== } engines: { node: '>=18' } brace-expansion@1.1.12: @@ -2642,11 +2618,6 @@ packages: engines: { node: '>=18' } hasBin: true - iconv-lite@0.6.3: - resolution: - { integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== } - engines: { node: '>=0.10.0' } - iconv-lite@0.7.0: resolution: { integrity: sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ== } @@ -3176,9 +3147,9 @@ packages: resolution: { integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w== } - mdast-util-to-hast@13.2.0: + mdast-util-to-hast@13.2.1: resolution: - { integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA== } + { integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA== } mdast-util-to-markdown@2.1.2: resolution: @@ -3435,9 +3406,9 @@ packages: { integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg== } engines: { node: '>= 0.6' } - next@15.5.6: + next@15.5.9: resolution: - { integrity: sha512-zTxsnI3LQo3c9HSdSf91O1jMNsEzIXDShXd4wVdg9y5shwLqBXi4ZtUUJyB86KGVSJLZx0PFONvO54aheGX8QQ== } + { integrity: sha512-agNLK89seZEtC5zUHwtut0+tNrc0Xw4FT/Dg+B/VLEo9pAcS9rtTKpek3V6kVcVwsB2YlqMaHdfZL4eLEVYuCg== } engines: { node: ^18.18.0 || ^19.8.0 || >= 20.0.0 } hasBin: true peerDependencies: @@ -3804,18 +3775,9 @@ packages: { integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== } engines: { node: '>=6' } - pvtsutils@1.3.6: + qs@6.14.1: resolution: - { integrity: sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg== } - - pvutils@1.1.3: - resolution: - { integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ== } - engines: { node: '>=6.0.0' } - - qs@6.14.0: - resolution: - { integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w== } + { integrity: sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ== } engines: { node: '>=0.6' } queue-microtask@1.2.3: @@ -3917,10 +3879,6 @@ packages: { integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== } engines: { node: '>= 6' } - reflect-metadata@0.2.2: - resolution: - { integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q== } - reflect.getprototypeof@1.0.10: resolution: { integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw== } @@ -4036,9 +3994,9 @@ packages: resolution: { integrity: sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ== } - rou3@0.5.1: + rou3@0.7.12: resolution: - { integrity: sha512-OXMmJ3zRk2xeXFGfA3K+EOPHC5u7RDFG7lIOx0X1pdnhUkI8MdVrbV+sNsD80ElpUZ+MRHdyxPnFthq9VHs8uQ== } + { integrity: sha512-iFE4hLDuloSWcD7mjdCDhx2bKcIsYbtOTpfH5MHHLSKMOUyjqQXTeZVa289uuwEGEKFoE/BAPbhaU4B774nceg== } router@2.2.0: resolution: @@ -4463,19 +4421,10 @@ packages: resolution: { integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== } - tslib@1.14.1: - resolution: - { integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== } - tslib@2.8.1: resolution: { integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== } - tsyringe@4.10.0: - resolution: - { integrity: sha512-axr3IdNuVIxnaK5XGEUFTu3YmAQ6lllgrvqfEoR16g/HGnYY/6We4oWENtAnzK6/LpJ2ur9PAb80RBt7/U4ugw== } - engines: { node: '>= 6.0.0' } - tunnel-agent@0.6.0: resolution: { integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== } @@ -4530,10 +4479,6 @@ packages: { integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw== } engines: { node: '>= 0.4' } - uncrypto@0.1.3: - resolution: - { integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q== } - undici-types@6.21.0: resolution: { integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== } @@ -4926,30 +4871,26 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 - '@better-auth/core@1.3.29(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.18)(better-call@1.0.19)(jose@6.1.0)(kysely@0.28.8)(nanostores@1.0.1)': + '@better-auth/core@1.4.12(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.7(zod@4.1.12))(jose@6.1.0)(kysely@0.28.8)(nanostores@1.0.1)': dependencies: '@better-auth/utils': 0.3.0 - '@better-fetch/fetch': 1.1.18 - better-call: 1.0.19 + '@better-fetch/fetch': 1.1.21 + '@standard-schema/spec': 1.1.0 + better-call: 1.1.7(zod@4.1.12) jose: 6.1.0 kysely: 0.28.8 nanostores: 1.0.1 zod: 4.1.12 - '@better-auth/telemetry@1.3.29(better-call@1.0.19)(jose@6.1.0)(kysely@0.28.8)(nanostores@1.0.1)': + '@better-auth/telemetry@1.4.12(@better-auth/core@1.4.12(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.7(zod@4.1.12))(jose@6.1.0)(kysely@0.28.8)(nanostores@1.0.1))': dependencies: - '@better-auth/core': 1.3.29(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.18)(better-call@1.0.19)(jose@6.1.0)(kysely@0.28.8)(nanostores@1.0.1) + '@better-auth/core': 1.4.12(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.7(zod@4.1.12))(jose@6.1.0)(kysely@0.28.8)(nanostores@1.0.1) '@better-auth/utils': 0.3.0 - '@better-fetch/fetch': 1.1.18 - transitivePeerDependencies: - - better-call - - jose - - kysely - - nanostores + '@better-fetch/fetch': 1.1.21 '@better-auth/utils@0.3.0': {} - '@better-fetch/fetch@1.1.18': {} + '@better-fetch/fetch@1.1.21': {} '@blocknote/core@0.41.1(@tiptap/extensions@3.7.2(@tiptap/core@3.7.2(@tiptap/pm@3.7.2))(@tiptap/pm@3.7.2))(@types/hast@3.0.4)': dependencies: @@ -5266,8 +5207,6 @@ snapshots: '@floating-ui/utils@0.2.10': {} - '@hexagon/base64@1.1.28': {} - '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.7': @@ -5402,8 +5341,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@levischuck/tiny-cbor@0.2.11': {} - '@mantine/core@8.3.5(@mantine/hooks@8.3.5(react@19.1.0))(@types/react@19.2.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': dependencies: '@floating-ui/react': 0.27.16(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -5464,34 +5401,34 @@ snapshots: '@tybys/wasm-util': 0.10.1 optional: true - '@next/env@15.5.6': {} + '@next/env@15.5.9': {} '@next/eslint-plugin-next@15.5.6': dependencies: fast-glob: 3.3.1 - '@next/swc-darwin-arm64@15.5.6': + '@next/swc-darwin-arm64@15.5.7': optional: true - '@next/swc-darwin-x64@15.5.6': + '@next/swc-darwin-x64@15.5.7': optional: true - '@next/swc-linux-arm64-gnu@15.5.6': + '@next/swc-linux-arm64-gnu@15.5.7': optional: true - '@next/swc-linux-arm64-musl@15.5.6': + '@next/swc-linux-arm64-musl@15.5.7': optional: true - '@next/swc-linux-x64-gnu@15.5.6': + '@next/swc-linux-x64-gnu@15.5.7': optional: true - '@next/swc-linux-x64-musl@15.5.6': + '@next/swc-linux-x64-musl@15.5.7': optional: true - '@next/swc-win32-arm64-msvc@15.5.6': + '@next/swc-win32-arm64-msvc@15.5.7': optional: true - '@next/swc-win32-x64-msvc@15.5.6': + '@next/swc-win32-x64-msvc@15.5.7': optional: true '@noble/ciphers@2.0.1': {} @@ -5512,102 +5449,6 @@ snapshots: '@nolyfill/is-core-module@1.0.39': {} - '@peculiar/asn1-android@2.5.0': - dependencies: - '@peculiar/asn1-schema': 2.5.0 - asn1js: 3.0.6 - tslib: 2.8.1 - - '@peculiar/asn1-cms@2.5.0': - dependencies: - '@peculiar/asn1-schema': 2.5.0 - '@peculiar/asn1-x509': 2.5.0 - '@peculiar/asn1-x509-attr': 2.5.0 - asn1js: 3.0.6 - tslib: 2.8.1 - - '@peculiar/asn1-csr@2.5.0': - dependencies: - '@peculiar/asn1-schema': 2.5.0 - '@peculiar/asn1-x509': 2.5.0 - asn1js: 3.0.6 - tslib: 2.8.1 - - '@peculiar/asn1-ecc@2.5.0': - dependencies: - '@peculiar/asn1-schema': 2.5.0 - '@peculiar/asn1-x509': 2.5.0 - asn1js: 3.0.6 - tslib: 2.8.1 - - '@peculiar/asn1-pfx@2.5.0': - dependencies: - '@peculiar/asn1-cms': 2.5.0 - '@peculiar/asn1-pkcs8': 2.5.0 - '@peculiar/asn1-rsa': 2.5.0 - '@peculiar/asn1-schema': 2.5.0 - asn1js: 3.0.6 - tslib: 2.8.1 - - '@peculiar/asn1-pkcs8@2.5.0': - dependencies: - '@peculiar/asn1-schema': 2.5.0 - '@peculiar/asn1-x509': 2.5.0 - asn1js: 3.0.6 - tslib: 2.8.1 - - '@peculiar/asn1-pkcs9@2.5.0': - dependencies: - '@peculiar/asn1-cms': 2.5.0 - '@peculiar/asn1-pfx': 2.5.0 - '@peculiar/asn1-pkcs8': 2.5.0 - '@peculiar/asn1-schema': 2.5.0 - '@peculiar/asn1-x509': 2.5.0 - '@peculiar/asn1-x509-attr': 2.5.0 - asn1js: 3.0.6 - tslib: 2.8.1 - - '@peculiar/asn1-rsa@2.5.0': - dependencies: - '@peculiar/asn1-schema': 2.5.0 - '@peculiar/asn1-x509': 2.5.0 - asn1js: 3.0.6 - tslib: 2.8.1 - - '@peculiar/asn1-schema@2.5.0': - dependencies: - asn1js: 3.0.6 - pvtsutils: 1.3.6 - tslib: 2.8.1 - - '@peculiar/asn1-x509-attr@2.5.0': - dependencies: - '@peculiar/asn1-schema': 2.5.0 - '@peculiar/asn1-x509': 2.5.0 - asn1js: 3.0.6 - tslib: 2.8.1 - - '@peculiar/asn1-x509@2.5.0': - dependencies: - '@peculiar/asn1-schema': 2.5.0 - asn1js: 3.0.6 - pvtsutils: 1.3.6 - tslib: 2.8.1 - - '@peculiar/x509@1.14.0': - dependencies: - '@peculiar/asn1-cms': 2.5.0 - '@peculiar/asn1-csr': 2.5.0 - '@peculiar/asn1-ecc': 2.5.0 - '@peculiar/asn1-pkcs9': 2.5.0 - '@peculiar/asn1-rsa': 2.5.0 - '@peculiar/asn1-schema': 2.5.0 - '@peculiar/asn1-x509': 2.5.0 - pvtsutils: 1.3.6 - reflect-metadata: 0.2.2 - tslib: 2.8.1 - tsyringe: 4.10.0 - '@remirror/core-constants@3.0.0': {} '@rtsao/scc@1.1.0': {} @@ -5621,24 +5462,13 @@ snapshots: '@shikijs/vscode-textmate@10.0.2': {} - '@simplewebauthn/browser@13.2.2': {} - - '@simplewebauthn/server@13.2.2': - dependencies: - '@hexagon/base64': 1.1.28 - '@levischuck/tiny-cbor': 0.2.11 - '@peculiar/asn1-android': 2.5.0 - '@peculiar/asn1-ecc': 2.5.0 - '@peculiar/asn1-rsa': 2.5.0 - '@peculiar/asn1-schema': 2.5.0 - '@peculiar/asn1-x509': 2.5.0 - '@peculiar/x509': 1.14.0 - '@so-ric/colorspace@1.1.6': dependencies: color: 5.0.2 text-hex: 1.0.0 + '@standard-schema/spec@1.1.0': {} + '@swc/helpers@0.5.15': dependencies: tslib: 2.8.1 @@ -6089,12 +5919,6 @@ snapshots: get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 - asn1js@3.0.6: - dependencies: - pvtsutils: 1.3.6 - pvutils: 1.1.3 - tslib: 2.8.1 - ast-types-flow@0.0.8: {} async-function@1.0.0: {} @@ -6129,34 +5953,35 @@ snapshots: baseline-browser-mapping@2.8.19: {} - better-auth@1.3.29(next@15.5.6(@babel/core@7.28.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + better-auth@1.4.12(better-sqlite3@12.4.1)(mysql2@3.15.3)(next@15.5.9(@babel/core@7.28.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: - '@better-auth/core': 1.3.29(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.18)(better-call@1.0.19)(jose@6.1.0)(kysely@0.28.8)(nanostores@1.0.1) - '@better-auth/telemetry': 1.3.29(better-call@1.0.19)(jose@6.1.0)(kysely@0.28.8)(nanostores@1.0.1) + '@better-auth/core': 1.4.12(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.7(zod@4.1.12))(jose@6.1.0)(kysely@0.28.8)(nanostores@1.0.1) + '@better-auth/telemetry': 1.4.12(@better-auth/core@1.4.12(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.7(zod@4.1.12))(jose@6.1.0)(kysely@0.28.8)(nanostores@1.0.1)) '@better-auth/utils': 0.3.0 - '@better-fetch/fetch': 1.1.18 + '@better-fetch/fetch': 1.1.21 '@noble/ciphers': 2.0.1 '@noble/hashes': 2.0.1 - '@simplewebauthn/browser': 13.2.2 - '@simplewebauthn/server': 13.2.2 - better-call: 1.0.19 + better-call: 1.1.7(zod@4.1.12) defu: 6.1.4 jose: 6.1.0 kysely: 0.28.8 nanostores: 1.0.1 zod: 4.1.12 optionalDependencies: - next: 15.5.6(@babel/core@7.28.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + better-sqlite3: 12.4.1 + mysql2: 3.15.3 + next: 15.5.9(@babel/core@7.28.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) react: 19.1.0 react-dom: 19.1.0(react@19.1.0) - better-call@1.0.19: + better-call@1.1.7(zod@4.1.12): dependencies: '@better-auth/utils': 0.3.0 - '@better-fetch/fetch': 1.1.18 - rou3: 0.5.1 + '@better-fetch/fetch': 1.1.21 + rou3: 0.7.12 set-cookie-parser: 2.7.1 - uncrypto: 0.1.3 + optionalDependencies: + zod: 4.1.12 better-sqlite3@12.4.1: dependencies: @@ -6173,15 +5998,15 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - body-parser@2.2.0: + body-parser@2.2.2: dependencies: bytes: 3.1.2 content-type: 1.0.5 debug: 4.4.3 http-errors: 2.0.0 - iconv-lite: 0.6.3 + iconv-lite: 0.7.0 on-finished: 2.4.1 - qs: 6.14.0 + qs: 6.14.1 raw-body: 3.0.1 type-is: 2.0.1 transitivePeerDependencies: @@ -6876,7 +6701,7 @@ snapshots: express@5.1.0: dependencies: accepts: 2.0.0 - body-parser: 2.2.0 + body-parser: 2.2.2 content-disposition: 1.0.0 content-type: 1.0.5 cookie: 0.7.2 @@ -6894,7 +6719,7 @@ snapshots: once: 1.4.0 parseurl: 1.3.3 proxy-addr: 2.0.7 - qs: 6.14.0 + qs: 6.14.1 range-parser: 1.2.1 router: 2.2.0 send: 1.2.0 @@ -7209,7 +7034,7 @@ snapshots: comma-separated-tokens: 2.0.3 hast-util-whitespace: 3.0.0 html-void-elements: 3.0.0 - mdast-util-to-hast: 13.2.0 + mdast-util-to-hast: 13.2.1 property-information: 7.1.0 space-separated-tokens: 2.0.2 stringify-entities: 4.0.4 @@ -7225,7 +7050,7 @@ snapshots: hast-util-to-text: 4.0.2 hast-util-whitespace: 3.0.0 mdast-util-phrasing: 4.1.0 - mdast-util-to-hast: 13.2.0 + mdast-util-to-hast: 13.2.1 mdast-util-to-string: 4.0.0 rehype-minify-whitespace: 6.0.2 trim-trailing-lines: 2.1.0 @@ -7271,10 +7096,6 @@ snapshots: husky@9.1.7: {} - iconv-lite@0.6.3: - dependencies: - safer-buffer: 2.1.2 - iconv-lite@0.7.0: dependencies: safer-buffer: 2.1.2 @@ -7718,7 +7539,7 @@ snapshots: '@types/mdast': 4.0.4 unist-util-is: 6.0.1 - mdast-util-to-hast@13.2.0: + mdast-util-to-hast@13.2.1: dependencies: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 @@ -8018,9 +7839,9 @@ snapshots: negotiator@1.0.0: {} - next@15.5.6(@babel/core@7.28.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + next@15.5.9(@babel/core@7.28.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: - '@next/env': 15.5.6 + '@next/env': 15.5.9 '@swc/helpers': 0.5.15 caniuse-lite: 1.0.30001751 postcss: 8.4.31 @@ -8028,14 +7849,14 @@ snapshots: react-dom: 19.1.0(react@19.1.0) styled-jsx: 5.1.6(@babel/core@7.28.4)(react@19.1.0) optionalDependencies: - '@next/swc-darwin-arm64': 15.5.6 - '@next/swc-darwin-x64': 15.5.6 - '@next/swc-linux-arm64-gnu': 15.5.6 - '@next/swc-linux-arm64-musl': 15.5.6 - '@next/swc-linux-x64-gnu': 15.5.6 - '@next/swc-linux-x64-musl': 15.5.6 - '@next/swc-win32-arm64-msvc': 15.5.6 - '@next/swc-win32-x64-msvc': 15.5.6 + '@next/swc-darwin-arm64': 15.5.7 + '@next/swc-darwin-x64': 15.5.7 + '@next/swc-linux-arm64-gnu': 15.5.7 + '@next/swc-linux-arm64-musl': 15.5.7 + '@next/swc-linux-x64-gnu': 15.5.7 + '@next/swc-linux-x64-musl': 15.5.7 + '@next/swc-win32-arm64-msvc': 15.5.7 + '@next/swc-win32-x64-msvc': 15.5.7 sharp: 0.34.4 transitivePeerDependencies: - '@babel/core' @@ -8345,13 +8166,7 @@ snapshots: punycode@2.3.1: {} - pvtsutils@1.3.6: - dependencies: - tslib: 2.8.1 - - pvutils@1.1.3: {} - - qs@6.14.0: + qs@6.14.1: dependencies: side-channel: 1.1.0 @@ -8442,8 +8257,6 @@ snapshots: string_decoder: 1.3.0 util-deprecate: 1.0.2 - reflect-metadata@0.2.2: {} - reflect.getprototypeof@1.0.10: dependencies: call-bind: 1.0.8 @@ -8524,7 +8337,7 @@ snapshots: dependencies: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 - mdast-util-to-hast: 13.2.0 + mdast-util-to-hast: 13.2.1 unified: 11.0.5 vfile: 6.0.3 @@ -8572,7 +8385,7 @@ snapshots: rope-sequence@1.3.4: {} - rou3@0.5.1: {} + rou3@0.7.12: {} router@2.2.0: dependencies: @@ -8978,14 +8791,8 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tslib@1.14.1: {} - tslib@2.8.1: {} - tsyringe@4.10.0: - dependencies: - tslib: 1.14.1 - tunnel-agent@0.6.0: dependencies: safe-buffer: 5.2.1 @@ -9046,8 +8853,6 @@ snapshots: has-symbols: 1.1.0 which-boxed-primitive: 1.1.1 - uncrypto@0.1.3: {} - undici-types@6.21.0: {} unicorn-magic@0.1.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index b7f0b35..9806ad8 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,6 @@ minimumReleaseAge: 1440 +overrides: + body-parser@>=2.2.0 <2.2.1: '>=2.2.1' + mdast-util-to-hast@>=13.0.0 <13.2.1: '>=13.2.1' + qs@<6.14.1: '>=6.14.1' diff --git a/src/app/api/v1/pages/[id]/breadcrumbs/route.ts b/src/app/api/v1/pages/[id]/breadcrumbs/route.ts new file mode 100644 index 0000000..ecae2d9 --- /dev/null +++ b/src/app/api/v1/pages/[id]/breadcrumbs/route.ts @@ -0,0 +1,56 @@ +import { apiRoute } from '@/lib/api/route-wrapper'; +import { pageRetriever } from '@/lib/database/retrievers/page-retriever'; +import { NotFoundError } from '@/lib/errors/not-found-error'; +import type { GetPageBreadcrumbsParameters, GetPageBreadcrumbsResponse, Page } from '@/types/api'; +import { getPageBreadcrumbsParametersSchema } from '@/types/api'; + +export const GET = apiRoute( + { + expectedParamsSchema: getPageBreadcrumbsParametersSchema, + }, + async ({ params }, session): Promise => { + const breadcrumbs: Page[] = []; + const visitedIds = new Set(); + + // Start with the current page + let currentPage = await pageRetriever.retrievePage(params.id, session.user.id); + + // Traverse up the parent chain + while (currentPage) { + // Prevent circular references + if (visitedIds.has(currentPage.id)) { + break; + } + visitedIds.add(currentPage.id); + + // Add current page to breadcrumb (will be reversed at the end) + breadcrumbs.push({ + id: currentPage.id, + name: currentPage.name, + emoji: currentPage.emoji || null, + parentId: currentPage.parentId || null, + createdAt: currentPage.createdAt, + lastUpdated: currentPage.lastUpdated, + }); + + // If no parent, we've reached the root + if (!currentPage.parentId) { + break; + } + + // Fetch the parent page using the centralized retriever + try { + currentPage = await pageRetriever.retrievePage(currentPage.parentId, session.user.id); + } catch (error) { + // If parent page not found, we've reached as far as we can go + if (error instanceof NotFoundError) { + break; + } + throw error; + } + } + + // Reverse to get root -> current order + return breadcrumbs.toReversed(); + } +); diff --git a/src/app/pages/[id]/page.tsx b/src/app/pages/[id]/page.tsx index 72df805..d5b33ab 100755 --- a/src/app/pages/[id]/page.tsx +++ b/src/app/pages/[id]/page.tsx @@ -14,6 +14,8 @@ import { useSearchParams } from 'next/navigation'; import { useUpdatePage } from '@/lib/hooks/api/use-update-page'; import { useSetPageBlocks } from '@/lib/hooks/api/use-set-page-blocks'; import { useNotification } from '@/lib/hooks/use-notification'; +import { usePageBreadcrumbs } from '@/lib/hooks/api/use-page-breadcrumbs'; +import { PageBreadcrumb } from '@/components/molecules/page-breadcrumb'; import styles from './page.module.css'; export default function PageDetailsPage() { @@ -26,6 +28,7 @@ export default function PageDetailsPage() { const selectedView = searchParameters.get('v') ?? 'contents'; const { data: pageDetails, isLoading, error, mutate } = usePageDetails(pageId); + const { data: breadcrumbs, isLoading: isLoadingBreadcrumbs } = usePageBreadcrumbs(pageId); const [showCreateViewForm, setShowCreateViewForm] = useState(false); const titleReference = useRef(null); @@ -150,6 +153,7 @@ export default function PageDetailsPage() { + {!isLoadingBreadcrumbs && breadcrumbs && breadcrumbs.length > 0 && } {pageDetails?.page.emoji} + {pages.map((page, index) => { + const isLast = index === pages.length - 1; + const content = ( + <Group gap="xs" wrap="nowrap"> + {page.emoji && <span>{page.emoji}</span>} + <span>{page.name}</span> + </Group> + ); + + if (isLast) { + return ( + <Text key={page.id} size="sm" fw={500}> + {content} + </Text> + ); + } + + return ( + <Anchor key={page.id} component={Link} href={`/pages/${page.id}`} size="sm"> + {content} + </Anchor> + ); + })} + </Breadcrumbs> + ); +} diff --git a/src/lib/hooks/api/use-page-breadcrumbs.ts b/src/lib/hooks/api/use-page-breadcrumbs.ts new file mode 100644 index 0000000..57dfcc3 --- /dev/null +++ b/src/lib/hooks/api/use-page-breadcrumbs.ts @@ -0,0 +1,6 @@ +import useSWR from 'swr'; +import { GET_PAGE_BREADCRUMBS_ENDPOINT, type GetPageBreadcrumbsResponse } from '@/types/api'; +import { swrFetcher } from '@/lib/swr/fetcher'; + +export const usePageBreadcrumbs = (pageId: string | null) => + useSWR<GetPageBreadcrumbsResponse>(pageId ? GET_PAGE_BREADCRUMBS_ENDPOINT.replace(':id', pageId) : null, swrFetcher); diff --git a/src/types/api/endpoints/get-page-breadcrumbs.ts b/src/types/api/endpoints/get-page-breadcrumbs.ts new file mode 100644 index 0000000..1b8fcaa --- /dev/null +++ b/src/types/api/endpoints/get-page-breadcrumbs.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import { pageSchema } from '../entities'; + +export const GET_PAGE_BREADCRUMBS_ENDPOINT = '/pages/:id/breadcrumbs'; + +export const getPageBreadcrumbsParametersSchema = z.object({ + id: z.string().min(1), +}); + +export type GetPageBreadcrumbsParameters = z.infer<typeof getPageBreadcrumbsParametersSchema>; + +export const getPageBreadcrumbsResponseSchema = z.array(pageSchema); + +export type GetPageBreadcrumbsResponse = z.infer<typeof getPageBreadcrumbsResponseSchema>; diff --git a/src/types/api/endpoints/index.ts b/src/types/api/endpoints/index.ts index 0054bfb..2a887a8 100755 --- a/src/types/api/endpoints/index.ts +++ b/src/types/api/endpoints/index.ts @@ -7,6 +7,7 @@ export * from './get-data-view'; export * from './get-data-views'; export * from './get-page-details'; export * from './get-page-blocks'; +export * from './get-page-breadcrumbs'; export * from './get-pages'; export * from './get-pages-tree'; export * from './update-data-source';