From a5c3b6e4e05e90af43b61ebd9a8e8597641f28f2 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Wed, 11 Mar 2026 01:49:24 +0800 Subject: [PATCH] Remove Convex module and its initialization from auth provider; update auth.json to reflect the change. --- package.json | 14 +- pnpm-lock.yaml | 340 ++++++++++++++++----------------------- public/auth.json | 1 - src/modules/convex.ts | 43 ----- src/pages/auth/index.tsx | 2 - 5 files changed, 150 insertions(+), 250 deletions(-) delete mode 100644 src/modules/convex.ts diff --git a/package.json b/package.json index dd992cc..1230ba5 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,9 @@ "@base-ui/react": "^1.2.0", "@kevisual/api": "^0.0.62", "@kevisual/context": "^0.0.8", - "@kevisual/router": "0.0.85", + "@kevisual/router": "0.1.0", "@tanstack/react-query": "^5.90.21", - "@tanstack/react-router": "^1.166.2", + "@tanstack/react-router": "^1.166.6", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", @@ -43,15 +43,15 @@ "access": "public" }, "devDependencies": { - "@kevisual/convex": "^0.0.5", "@kevisual/kv-login": "^0.1.17", - "@kevisual/query": "0.0.52", + "@kevisual/query": "0.0.53", + "@kevisual/ai": "0.0.27", "@kevisual/types": "^0.0.12", "@kevisual/vite-html-plugin": "^0.0.1", "@tailwindcss/vite": "^4.2.1", - "@tanstack/react-router-devtools": "^1.166.2", - "@tanstack/router-plugin": "^1.166.2", - "@types/node": "^25.3.5", + "@tanstack/react-router-devtools": "^1.166.6", + "@tanstack/router-plugin": "^1.166.6", + "@types/node": "^25.4.0", "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e228e44..4525084 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,14 +18,14 @@ importers: specifier: ^0.0.8 version: 0.0.8 '@kevisual/router': - specifier: 0.0.85 - version: 0.0.85 + specifier: 0.1.0 + version: 0.1.0 '@tanstack/react-query': specifier: ^5.90.21 version: 5.90.21(react@19.2.4) '@tanstack/react-router': - specifier: ^1.166.2 - version: 1.166.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + specifier: ^1.166.6 + version: 1.166.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4) class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -72,33 +72,33 @@ importers: specifier: ^5.0.11 version: 5.0.11(@types/react@19.2.14)(react@19.2.4)(use-sync-external-store@1.6.0(react@19.2.4)) devDependencies: - '@kevisual/convex': - specifier: ^0.0.5 - version: 0.0.5(@ai-sdk/provider-utils@4.0.19(zod@3.25.76))(ai@5.0.149(zod@3.25.76))(convex-helpers@0.1.114(@standard-schema/spec@1.1.0)(convex@1.32.0(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(zod@3.25.76))(react@19.2.4)(zod@3.25.76) + '@kevisual/ai': + specifier: 0.0.27 + version: 0.0.27 '@kevisual/kv-login': specifier: ^0.1.17 version: 0.1.17 '@kevisual/query': - specifier: 0.0.52 - version: 0.0.52 + specifier: 0.0.53 + version: 0.0.53 '@kevisual/types': specifier: ^0.0.12 version: 0.0.12 '@kevisual/vite-html-plugin': specifier: ^0.0.1 - version: 0.0.1(vite@8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)) + version: 0.0.1(vite@8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)) '@tailwindcss/vite': specifier: ^4.2.1 - version: 4.2.1(vite@8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)) + version: 4.2.1(vite@8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)) '@tanstack/react-router-devtools': - specifier: ^1.166.2 - version: 1.166.2(@tanstack/react-router@1.166.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@tanstack/router-core@1.166.2)(csstype@3.2.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + specifier: ^1.166.6 + version: 1.166.6(@tanstack/react-router@1.166.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@tanstack/router-core@1.166.6)(csstype@3.2.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) '@tanstack/router-plugin': - specifier: ^1.166.2 - version: 1.166.2(@tanstack/react-router@1.166.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)) + specifier: ^1.166.6 + version: 1.166.6(@tanstack/react-router@1.166.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)) '@types/node': - specifier: ^25.3.5 - version: 25.3.5 + specifier: ^25.4.0 + version: 25.4.0 '@types/react': specifier: ^19.2.14 version: 19.2.14 @@ -107,7 +107,7 @@ importers: version: 19.2.3(@types/react@19.2.14) '@vitejs/plugin-react': specifier: ^5.1.4 - version: 5.1.4(vite@8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)) + version: 5.1.4(vite@8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)) dotenv: specifier: ^17.3.1 version: 17.3.1 @@ -125,12 +125,24 @@ importers: version: 5.9.3 vite: specifier: v8.0.0-beta.16 - version: 8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0) + version: 8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0) packages: - '@ai-sdk/gateway@2.0.54': - resolution: {integrity: sha512-bK47JS1IYanXc5ruhfEVLDUcig7Im3gQr5p52AB4x//mT/wcGLf85SxwGWzw42pyOsW8ee38Wy567WWJc90s/A==} + '@ai-sdk/anthropic@3.0.58': + resolution: {integrity: sha512-/53SACgmVukO4bkms4dpxpRlYhW8Ct6QZRe6sj1Pi5H00hYhxIrqfiLbZBGxkdRvjsBQeP/4TVGsXgH5rQeb8Q==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + + '@ai-sdk/gateway@3.0.66': + resolution: {integrity: sha512-SIQ0YY0iMuv+07HLsZ+bB990zUJ6S4ujORAh+Jv1V2KGNn73qQKnGO0JBk+w+Res8YqOFSycwDoWcFlQrVxS4A==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + + '@ai-sdk/openai-compatible@2.0.35': + resolution: {integrity: sha512-g3wA57IAQFb+3j4YuFndgkUdXyRETZVvbfAWM+UX7bZSxA3xjes0v3XKgIdKdekPtDGsh4ZX2byHD0gJIMPfiA==} engines: {node: '>=18'} peerDependencies: zod: ^3.25.76 || ^4.1.8 @@ -141,22 +153,12 @@ packages: peerDependencies: zod: ^3.25.76 || ^4.1.8 - '@ai-sdk/provider-utils@3.0.22': - resolution: {integrity: sha512-fFT1KfUUKktfAFm5mClJhS1oux9tP2qgzmEZVl5UdwltQ1LO/s8hd7znVrgKzivwv1s1FIPza0s9OpJaNB/vHw==} - engines: {node: '>=18'} - peerDependencies: - zod: ^3.25.76 || ^4.1.8 - '@ai-sdk/provider-utils@4.0.19': resolution: {integrity: sha512-3eG55CrSWCu2SXlqq2QCsFjo3+E7+Gmg7i/oRVoSZzIodTuDSfLb3MRje67xE9RFea73Zao7Lm4mADIfUETKGg==} engines: {node: '>=18'} peerDependencies: zod: ^3.25.76 || ^4.1.8 - '@ai-sdk/provider@2.0.1': - resolution: {integrity: sha512-KCUwswvsC5VsW2PWFqF8eJgSCu5Ysj7m1TxiHTVA6g7k360bk0RNQENT8KTMAYEs+8fWPD3Uu4dEmzGHc+jGng==} - engines: {node: '>=18'} - '@ai-sdk/provider@3.0.8': resolution: {integrity: sha512-oGMAgGoQdBXbZqNG0Ze56CHjDZ1IDYOwGYxYjO5KLSlz5HiNQ9udIXsPZ61VWaHGZ5XW/jyjmr6t2xz2jGVwbQ==} engines: {node: '>=18'} @@ -281,18 +283,6 @@ packages: '@types/react': optional: true - '@convex-dev/agent@0.3.2': - resolution: {integrity: sha512-TMFReXejAIUE22OOn8PYvoOseAqwVOPm4WZU554GFk0lJ9kcNCGRJP/T1NTZfSBXrSaSUjETMFv2vEfXbG+4Qg==} - peerDependencies: - '@ai-sdk/provider-utils': ^3.0.7 - ai: ^5.0.29 - convex: ^1.24.8 - convex-helpers: ^0.1.103 - react: ^18.3.1 || ^19.0.0 - peerDependenciesMeta: - react: - optional: true - '@emnapi/core@1.8.1': resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==} @@ -645,32 +635,38 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@kevisual/ai@0.0.27': + resolution: {integrity: sha512-1FlDg3Tj4171XY5NpTq+do69CyACgDE5oTA1RJYxQlGgaPeAjx2V2ahBgIDHRRhMSX/ztB1pBF1rx4zDoXq99A==} + '@kevisual/api@0.0.62': resolution: {integrity: sha512-GB8Ho2absXoXoZP2GKyuoRqRqjdwtV0JR512DXBaKJR2sIPn1KvuglbBiX+zPjDBBskv/ApvZKOoSwj1OmkrKQ==} - '@kevisual/auth@2.0.3': - resolution: {integrity: sha512-4xpijaIhlCTr/DlJaV/gmkCQeg45EO1yxWpRvUX+1jCdVbuxSR0wZrF0SD9oybnjmKWMKDNPLsXyduFjMGcItA==} - '@kevisual/context@0.0.8': resolution: {integrity: sha512-DTJpyHI34NE76B7g6f+QlIqiCCyqI2qkBMQE736dzeRDGxOjnbe2iQY9W+Rt2PE6kmymM3qyOmSfNovyWyWrkA==} - '@kevisual/convex@0.0.5': - resolution: {integrity: sha512-cT00xSscYb72DjylAYqe//ioq4klFghQbsKyen7HTZMQJGe3SfPcD3cnA3KN9W+sPdFYjESdGvNxvK0npDKaVg==} - '@kevisual/js-filter@0.0.5': resolution: {integrity: sha512-+S+Sf3K/aP6XtZI2s7TgKOr35UuvUvtpJ9YDW30a+mY0/N8gRuzyKhieBzQN7Ykayzz70uoMavBXut2rUlLgzw==} + '@kevisual/js-filter@0.0.6': + resolution: {integrity: sha512-FcbOsmS1inhwrfgXMM/XLFTGTHUxBCss32JEMYdEFWQDYCar5rN8cxD1W8FuKDTVRlpA+zBpQ/BE6XT4UaeljA==} + '@kevisual/kv-login@0.1.17': resolution: {integrity: sha512-dcedzWw8xklQG54U/O3xUxxOtF1FGCVC4shYpGdrPdgFZ9xzzgZdrKSBJ9QuDOa9N59whfgtqrNKvmN/x9kiSg==} '@kevisual/load@0.0.6': resolution: {integrity: sha512-+3YTFehRcZ1haGel5DKYMUwmi5i6f2psyaPZlfkKU/cOXgkpwoG9/BEqPCnPjicKqqnksEpixVRkyHJ+5bjLVA==} - '@kevisual/query@0.0.52': - resolution: {integrity: sha512-m1UbyDTIxtfAQXM+EqhXA4ytE2V8rV8mXTZVBwzfW9O6+gtvAcRY7K1YYxfewTSXLVh9nwvfHe0KQ8MDL5ukyw==} + '@kevisual/logger@0.0.4': + resolution: {integrity: sha512-+fpr92eokSxoGOW1SIRl/27lPuO+zyY+feR5o2Q4YCNlAdt2x64NwC/w8r/3NEC5QenLgd4K0azyKTI2mHbARw==} - '@kevisual/router@0.0.85': - resolution: {integrity: sha512-ihSzPXHOMSOnZD/+Eso4yZMt4MoUXyLdfRHhXJGg90+sJBr/BjsmgAokit4pI9gWU+Rs/3JqQ2/aqA43FHtGoA==} + '@kevisual/permission@0.0.4': + resolution: {integrity: sha512-zwBYPnT/z21W4q2wkklJrxvoYBYWG/+a3iXFDKqXQAnDOcxm/SU1f1N6FQb9KxGKl36/fclVlhxlxqszvKCenQ==} + + '@kevisual/query@0.0.53': + resolution: {integrity: sha512-PAhpCLBr0emz0lGNlTVHMbJiC5wrtGLbInPddRzgKE35fiyNt+SWSsUWABiD0DeNrLN/OxWyAFobt880Z/e5MQ==} + + '@kevisual/router@0.1.0': + resolution: {integrity: sha512-7NHoKP36uWkTDp/hxeUBMtawma91BrOAwG/caOrVsO8tM3wjqhlmCt0sIvLBM+snVJkmylROQR0WGaygd3JqYw==} '@kevisual/types@0.0.12': resolution: {integrity: sha512-zJXH2dosir3jVrQ6QG4i0+iLQeT9gJ3H+cKXs8ReWboxBSYzUZO78XssVeVrFPsJ33iaAqo4q3DWbSS1dWGn7Q==} @@ -1091,20 +1087,20 @@ packages: peerDependencies: react: ^18 || ^19 - '@tanstack/react-router-devtools@1.166.2': - resolution: {integrity: sha512-EQhFQRArwxS0OjIWWGD5wfNboJq7rIYCbioHvepgbxgblKtNLWnRr3LFj34QhXTP1aQsPYb9t8+VTi3VbFuAfA==} + '@tanstack/react-router-devtools@1.166.6': + resolution: {integrity: sha512-TheVyOgo8ljD8wHHLceFsnKrX7nhTIQv9WokSrPjNTP4H3synUMADxh8yZafVYdr6lS2CBvldd5s7JI8DcwBUg==} engines: {node: '>=20.19'} peerDependencies: - '@tanstack/react-router': ^1.166.2 - '@tanstack/router-core': ^1.166.2 + '@tanstack/react-router': ^1.166.6 + '@tanstack/router-core': ^1.166.6 react: '>=18.0.0 || >=19.0.0' react-dom: '>=18.0.0 || >=19.0.0' peerDependenciesMeta: '@tanstack/router-core': optional: true - '@tanstack/react-router@1.166.2': - resolution: {integrity: sha512-pKhUtrvVLlhjWhsHkJSuIzh1J4LcP+8ErbIqRLORX9Js8dUFMKoT0+8oFpi+P8QRpuhm/7rzjYiWfcyTsqQZtA==} + '@tanstack/react-router@1.166.6': + resolution: {integrity: sha512-lfymPCfTkLQaNj/KIPElt+6B9REwPw2/Of3KtMwhNINs7h2xFQMSAOYk+ItCv8i93lBczlg89BRHtRS99qmzyA==} engines: {node: '>=20.19'} peerDependencies: react: '>=18.0.0 || >=19.0.0' @@ -1116,30 +1112,30 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - '@tanstack/router-core@1.166.2': - resolution: {integrity: sha512-zn3NhENOAX9ToQiX077UV2OH3aJKOvV2ZMNZZxZ3gDG3i3WqL8NfWfEgetEAfMN37/Mnt90PpotYgf7IyuoKqQ==} + '@tanstack/router-core@1.166.6': + resolution: {integrity: sha512-SwVPMQxjoY4jwiNgD9u5kDFp/iSaf3wgf1t93xRCC6qDHmv/xLaawhvwEPNIJaPepWuSYRpywpJWH9hGlBqVbw==} engines: {node: '>=20.19'} - '@tanstack/router-devtools-core@1.166.2': - resolution: {integrity: sha512-Ke8HquuwMhLYpo/6nxNgrzi9Ns2lsK9uwDba6WKA8I0K7fyYZoAUu+7AD6gdEcVU4NF6LjtMPfUCHmVtYYRTDw==} + '@tanstack/router-devtools-core@1.166.6': + resolution: {integrity: sha512-ndPnCDeSGW3bd33u3EMe3+EJGLiFOHZaIKRJRLdZClOB6J6pvzKMELJgizBtjaR6X56FdCsC/STgjPkOeR9paA==} engines: {node: '>=20.19'} peerDependencies: - '@tanstack/router-core': ^1.166.2 + '@tanstack/router-core': ^1.166.6 csstype: ^3.0.10 peerDependenciesMeta: csstype: optional: true - '@tanstack/router-generator@1.166.2': - resolution: {integrity: sha512-wbvdyP1PKKQKk4aVlGeK9S5uDy8zodTr3tEZ2gRKNavJLusXbEWqtoo42JxHFFNB6dtguehFMt8PyZPAtkgWwQ==} + '@tanstack/router-generator@1.166.6': + resolution: {integrity: sha512-D7Z6oLP2IfflXUzOOxIgeCD8v3/SXU//cgBon0pbF13HkKdf9Zlt97kQqcaOkbnruJJ6i5xtUIsoAQbMmj+EsQ==} engines: {node: '>=20.19'} - '@tanstack/router-plugin@1.166.2': - resolution: {integrity: sha512-TnyV/7//Vp5fR49mmNbOWHGz9IJTm1lqVxzPdtpzg7D5PjkW2HFmLFLtWwpJgz2R7AJJWR4Ge5kIPmC+fVZ6eQ==} + '@tanstack/router-plugin@1.166.6': + resolution: {integrity: sha512-07ZwOMNDlKIoaRtrfP5zO3VfqXNg2Zm7qvqZOBaTbbqgMvaKclW0ylqakweXtDwiNs9GPf/+lH/xyc+CgLGUyg==} engines: {node: '>=20.19'} peerDependencies: '@rsbuild/core': '>=1.0.2' - '@tanstack/react-router': ^1.166.2 + '@tanstack/react-router': ^1.166.6 vite: '>=5.0.0 || >=6.0.0 || >=7.0.0' vite-plugin-solid: ^2.11.10 webpack: '>=5.92.0' @@ -1181,8 +1177,8 @@ packages: '@types/babel__traverse@7.28.0': resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} - '@types/node@25.3.5': - resolution: {integrity: sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA==} + '@types/node@25.4.0': + resolution: {integrity: sha512-9wLpoeWuBlcbBpOY3XmzSTG3oscB6xjBEEtn+pYXTfhyXhIxC5FsBer2KTopBlvKEiW9l13po9fq+SJY/5lkhw==} '@types/react-dom@19.2.3': resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==} @@ -1192,9 +1188,6 @@ packages: '@types/react@19.2.14': resolution: {integrity: sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==} - '@ungap/structured-clone@1.3.0': - resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} - '@vercel/oidc@3.1.0': resolution: {integrity: sha512-Fw28YZpRnA3cAHHDlkt7xQHiJ0fcL+NRcIqsocZQUSmbzeIKRpwttJjik5ZGanXP+vlA4SbTg+AbA3bP363l+w==} engines: {node: '>= 20'} @@ -1210,8 +1203,8 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - ai@5.0.149: - resolution: {integrity: sha512-ebOvqbUZ4njabaKC7gpuFBbNsyvH8y/9eyIDgKefu9PB8j5GdkWKsXNtPxhz4PDFnDb0GClCtsJ4j/gWy71UNg==} + ai@6.0.116: + resolution: {integrity: sha512-7yM+cTmyRLeNIXwt4Vj+mrrJgVQ9RMIW5WO0ydoLoYkewIvsMcvUmqS4j2RJTUXaF1HphwmSKUMQ/HypNRGOmA==} engines: {node: '>=18'} peerDependencies: zod: ^3.25.76 || ^4.1.8 @@ -1278,28 +1271,6 @@ packages: convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - convex-helpers@0.1.114: - resolution: {integrity: sha512-elEdh+gG6BDv2dWIWVvBeJPbHnDQS5+WexUuwlGVJXz1EbMkXz/UIQwFIfLMZIXUwW6ot4JYf/1JJKNStrE6lg==} - hasBin: true - peerDependencies: - '@standard-schema/spec': ^1.0.0 - convex: ^1.32.0 - hono: ^4.0.5 - react: ^17.0.2 || ^18.0.0 || ^19.0.0 - typescript: ^5.5 - zod: ^3.25.0 || ^4.0.0 - peerDependenciesMeta: - '@standard-schema/spec': - optional: true - hono: - optional: true - react: - optional: true - typescript: - optional: true - zod: - optional: true - convex@1.32.0: resolution: {integrity: sha512-5FlajdLpW75pdLS+/CgGH5H6yeRuA+ru50AKJEYbJpmyILUS+7fdTvsdTaQ7ZFXMv0gE8mX4S+S3AtJ94k0mfw==} engines: {node: '>=18.0.0', npm: '>=7.0.0'} @@ -1457,9 +1428,6 @@ packages: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true - jose@6.2.0: - resolution: {integrity: sha512-xsfE1TcSCbUdo6U07tR0mvhg0flGxU8tPLbF03mirl2ukGQENhUg4ubGYQnhVH0b5stLlPM+WOqDkEl1R1y5sQ==} - js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1864,6 +1832,9 @@ packages: zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} + zod@4.3.6: + resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} + zustand@5.0.11: resolution: {integrity: sha512-fdZY+dk7zn/vbWNCYmzZULHRrss0jx5pPFiOuMZ/5HJN6Yv3u+1Wswy/4MpZEkEGhtNH+pwxZB8OKgUBPzYAGg==} engines: {node: '>=12.20.0'} @@ -1884,36 +1855,37 @@ packages: snapshots: - '@ai-sdk/gateway@2.0.54(zod@3.25.76)': + '@ai-sdk/anthropic@3.0.58(zod@4.3.6)': dependencies: - '@ai-sdk/provider': 2.0.1 - '@ai-sdk/provider-utils': 3.0.22(zod@3.25.76) + '@ai-sdk/provider': 3.0.8 + '@ai-sdk/provider-utils': 4.0.19(zod@4.3.6) + zod: 4.3.6 + + '@ai-sdk/gateway@3.0.66(zod@4.3.6)': + dependencies: + '@ai-sdk/provider': 3.0.8 + '@ai-sdk/provider-utils': 4.0.19(zod@4.3.6) '@vercel/oidc': 3.1.0 - zod: 3.25.76 + zod: 4.3.6 - '@ai-sdk/openai@3.0.41(zod@3.25.76)': + '@ai-sdk/openai-compatible@2.0.35(zod@4.3.6)': dependencies: '@ai-sdk/provider': 3.0.8 - '@ai-sdk/provider-utils': 4.0.19(zod@3.25.76) - zod: 3.25.76 + '@ai-sdk/provider-utils': 4.0.19(zod@4.3.6) + zod: 4.3.6 - '@ai-sdk/provider-utils@3.0.22(zod@3.25.76)': + '@ai-sdk/openai@3.0.41(zod@4.3.6)': dependencies: - '@ai-sdk/provider': 2.0.1 - '@standard-schema/spec': 1.1.0 - eventsource-parser: 3.0.6 - zod: 3.25.76 + '@ai-sdk/provider': 3.0.8 + '@ai-sdk/provider-utils': 4.0.19(zod@4.3.6) + zod: 4.3.6 - '@ai-sdk/provider-utils@4.0.19(zod@3.25.76)': + '@ai-sdk/provider-utils@4.0.19(zod@4.3.6)': dependencies: '@ai-sdk/provider': 3.0.8 '@standard-schema/spec': 1.1.0 eventsource-parser: 3.0.6 - zod: 3.25.76 - - '@ai-sdk/provider@2.0.1': - dependencies: - json-schema: 0.4.0 + zod: 4.3.6 '@ai-sdk/provider@3.0.8': dependencies: @@ -2067,16 +2039,6 @@ snapshots: optionalDependencies: '@types/react': 19.2.14 - '@convex-dev/agent@0.3.2(@ai-sdk/provider-utils@4.0.19(zod@3.25.76))(ai@5.0.149(zod@3.25.76))(convex-helpers@0.1.114(@standard-schema/spec@1.1.0)(convex@1.32.0(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(zod@3.25.76))(convex@1.32.0(react@19.2.4))(react@19.2.4)': - dependencies: - '@ai-sdk/provider-utils': 4.0.19(zod@3.25.76) - ai: 5.0.149(zod@3.25.76) - convex: 1.32.0(react@19.2.4) - convex-helpers: 0.1.114(@standard-schema/spec@1.1.0)(convex@1.32.0(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(zod@3.25.76) - optionalDependencies: - '@ungap/structured-clone': 1.3.0 - react: 19.2.4 - '@emnapi/core@1.8.1': dependencies: '@emnapi/wasi-threads': 1.1.0 @@ -2285,6 +2247,18 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 + '@kevisual/ai@0.0.27': + dependencies: + '@ai-sdk/anthropic': 3.0.58(zod@4.3.6) + '@ai-sdk/openai': 3.0.41(zod@4.3.6) + '@ai-sdk/openai-compatible': 2.0.35(zod@4.3.6) + '@kevisual/js-filter': 0.0.6 + '@kevisual/logger': 0.0.4 + '@kevisual/permission': 0.0.4 + '@kevisual/query': 0.0.53 + ai: 6.0.116(zod@4.3.6) + zod: 4.3.6 + '@kevisual/api@0.0.62(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(use-sync-external-store@1.6.0(react@19.2.4))': dependencies: '@kevisual/context': 0.0.8 @@ -2306,49 +2280,33 @@ snapshots: - react-dom - use-sync-external-store - '@kevisual/auth@2.0.3': {} - '@kevisual/context@0.0.8': {} - '@kevisual/convex@0.0.5(@ai-sdk/provider-utils@4.0.19(zod@3.25.76))(ai@5.0.149(zod@3.25.76))(convex-helpers@0.1.114(@standard-schema/spec@1.1.0)(convex@1.32.0(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(zod@3.25.76))(react@19.2.4)(zod@3.25.76)': - dependencies: - '@ai-sdk/openai': 3.0.41(zod@3.25.76) - '@convex-dev/agent': 0.3.2(@ai-sdk/provider-utils@4.0.19(zod@3.25.76))(ai@5.0.149(zod@3.25.76))(convex-helpers@0.1.114(@standard-schema/spec@1.1.0)(convex@1.32.0(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(zod@3.25.76))(convex@1.32.0(react@19.2.4))(react@19.2.4) - '@kevisual/auth': 2.0.3 - '@kevisual/context': 0.0.8 - convex: 1.32.0(react@19.2.4) - jose: 6.2.0 - nanoid: 5.1.6 - transitivePeerDependencies: - - '@ai-sdk/provider-utils' - - '@auth0/auth0-react' - - '@clerk/clerk-react' - - ai - - bufferutil - - convex-helpers - - react - - utf-8-validate - - zod - '@kevisual/js-filter@0.0.5': {} + '@kevisual/js-filter@0.0.6': {} + '@kevisual/kv-login@0.1.17': {} '@kevisual/load@0.0.6': dependencies: eventemitter3: 5.0.4 - '@kevisual/query@0.0.52': {} + '@kevisual/logger@0.0.4': {} - '@kevisual/router@0.0.85': + '@kevisual/permission@0.0.4': {} + + '@kevisual/query@0.0.53': {} + + '@kevisual/router@0.1.0': dependencies: es-toolkit: 1.45.1 '@kevisual/types@0.0.12': {} - '@kevisual/vite-html-plugin@0.0.1(vite@8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))': + '@kevisual/vite-html-plugin@0.0.1(vite@8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))': dependencies: - vite: 8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0) + vite: 8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0) '@napi-rs/wasm-runtime@1.1.1': dependencies: @@ -2638,12 +2596,12 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.2.1 '@tailwindcss/oxide-win32-x64-msvc': 4.2.1 - '@tailwindcss/vite@4.2.1(vite@8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))': + '@tailwindcss/vite@4.2.1(vite@8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))': dependencies: '@tailwindcss/node': 4.2.1 '@tailwindcss/oxide': 4.2.1 tailwindcss: 4.2.1 - vite: 8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0) + vite: 8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0) '@tanstack/history@1.161.4': {} @@ -2654,22 +2612,22 @@ snapshots: '@tanstack/query-core': 5.90.20 react: 19.2.4 - '@tanstack/react-router-devtools@1.166.2(@tanstack/react-router@1.166.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@tanstack/router-core@1.166.2)(csstype@3.2.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': + '@tanstack/react-router-devtools@1.166.6(@tanstack/react-router@1.166.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@tanstack/router-core@1.166.6)(csstype@3.2.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': dependencies: - '@tanstack/react-router': 1.166.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@tanstack/router-devtools-core': 1.166.2(@tanstack/router-core@1.166.2)(csstype@3.2.3) + '@tanstack/react-router': 1.166.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + '@tanstack/router-devtools-core': 1.166.6(@tanstack/router-core@1.166.6)(csstype@3.2.3) react: 19.2.4 react-dom: 19.2.4(react@19.2.4) optionalDependencies: - '@tanstack/router-core': 1.166.2 + '@tanstack/router-core': 1.166.6 transitivePeerDependencies: - csstype - '@tanstack/react-router@1.166.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': + '@tanstack/react-router@1.166.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4)': dependencies: '@tanstack/history': 1.161.4 '@tanstack/react-store': 0.9.1(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@tanstack/router-core': 1.166.2 + '@tanstack/router-core': 1.166.6 isbot: 5.1.35 react: 19.2.4 react-dom: 19.2.4(react@19.2.4) @@ -2683,7 +2641,7 @@ snapshots: react-dom: 19.2.4(react@19.2.4) use-sync-external-store: 1.6.0(react@19.2.4) - '@tanstack/router-core@1.166.2': + '@tanstack/router-core@1.166.6': dependencies: '@tanstack/history': 1.161.4 '@tanstack/store': 0.9.1 @@ -2693,18 +2651,18 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 - '@tanstack/router-devtools-core@1.166.2(@tanstack/router-core@1.166.2)(csstype@3.2.3)': + '@tanstack/router-devtools-core@1.166.6(@tanstack/router-core@1.166.6)(csstype@3.2.3)': dependencies: - '@tanstack/router-core': 1.166.2 + '@tanstack/router-core': 1.166.6 clsx: 2.1.1 goober: 2.1.18(csstype@3.2.3) tiny-invariant: 1.3.3 optionalDependencies: csstype: 3.2.3 - '@tanstack/router-generator@1.166.2': + '@tanstack/router-generator@1.166.6': dependencies: - '@tanstack/router-core': 1.166.2 + '@tanstack/router-core': 1.166.6 '@tanstack/router-utils': 1.161.4 '@tanstack/virtual-file-routes': 1.161.4 prettier: 3.8.1 @@ -2715,7 +2673,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.166.2(@tanstack/react-router@1.166.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))': + '@tanstack/router-plugin@1.166.6(@tanstack/react-router@1.166.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))': dependencies: '@babel/core': 7.29.0 '@babel/plugin-syntax-jsx': 7.28.6(@babel/core@7.29.0) @@ -2723,16 +2681,16 @@ snapshots: '@babel/template': 7.28.6 '@babel/traverse': 7.29.0 '@babel/types': 7.29.0 - '@tanstack/router-core': 1.166.2 - '@tanstack/router-generator': 1.166.2 + '@tanstack/router-core': 1.166.6 + '@tanstack/router-generator': 1.166.6 '@tanstack/router-utils': 1.161.4 '@tanstack/virtual-file-routes': 1.161.4 chokidar: 3.6.0 unplugin: 2.3.11 zod: 3.25.76 optionalDependencies: - '@tanstack/react-router': 1.166.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - vite: 8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0) + '@tanstack/react-router': 1.166.6(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + vite: 8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0) transitivePeerDependencies: - supports-color @@ -2780,7 +2738,7 @@ snapshots: dependencies: '@babel/types': 7.29.0 - '@types/node@25.3.5': + '@types/node@25.4.0': dependencies: undici-types: 7.18.2 @@ -2792,12 +2750,9 @@ snapshots: dependencies: csstype: 3.2.3 - '@ungap/structured-clone@1.3.0': - optional: true - '@vercel/oidc@3.1.0': {} - '@vitejs/plugin-react@5.1.4(vite@8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))': + '@vitejs/plugin-react@5.1.4(vite@8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))': dependencies: '@babel/core': 7.29.0 '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.29.0) @@ -2805,19 +2760,19 @@ snapshots: '@rolldown/pluginutils': 1.0.0-rc.3 '@types/babel__core': 7.20.5 react-refresh: 0.18.0 - vite: 8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0) + vite: 8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0) transitivePeerDependencies: - supports-color acorn@8.15.0: {} - ai@5.0.149(zod@3.25.76): + ai@6.0.116(zod@4.3.6): dependencies: - '@ai-sdk/gateway': 2.0.54(zod@3.25.76) - '@ai-sdk/provider': 2.0.1 - '@ai-sdk/provider-utils': 3.0.22(zod@3.25.76) + '@ai-sdk/gateway': 3.0.66(zod@4.3.6) + '@ai-sdk/provider': 3.0.8 + '@ai-sdk/provider-utils': 4.0.19(zod@4.3.6) '@opentelemetry/api': 1.9.0 - zod: 3.25.76 + zod: 4.3.6 ansis@4.2.0: {} @@ -2895,15 +2850,6 @@ snapshots: convert-source-map@2.0.0: {} - convex-helpers@0.1.114(@standard-schema/spec@1.1.0)(convex@1.32.0(react@19.2.4))(react@19.2.4)(typescript@5.9.3)(zod@3.25.76): - dependencies: - convex: 1.32.0(react@19.2.4) - optionalDependencies: - '@standard-schema/spec': 1.1.0 - react: 19.2.4 - typescript: 5.9.3 - zod: 3.25.76 - convex@1.32.0(react@19.2.4): dependencies: esbuild: 0.27.0 @@ -3057,8 +3003,6 @@ snapshots: jiti@2.6.1: {} - jose@6.2.0: {} - js-tokens@4.0.0: {} jsesc@3.1.0: {} @@ -3327,7 +3271,7 @@ snapshots: dependencies: react: 19.2.4 - vite@8.0.0-beta.16(@types/node@25.3.5)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0): + vite@8.0.0-beta.16(@types/node@25.4.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0): dependencies: '@oxc-project/runtime': 0.115.0 lightningcss: 1.31.1 @@ -3336,7 +3280,7 @@ snapshots: rolldown: 1.0.0-rc.6 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 25.3.5 + '@types/node': 25.4.0 esbuild: 0.27.3 fsevents: 2.3.3 jiti: 2.6.1 @@ -3350,6 +3294,8 @@ snapshots: zod@3.25.76: {} + zod@4.3.6: {} + zustand@5.0.11(@types/react@19.2.14)(react@19.2.4)(use-sync-external-store@1.6.0(react@19.2.4)): optionalDependencies: '@types/react': 19.2.14 diff --git a/public/auth.json b/public/auth.json index 3e96919..acf0250 100644 --- a/public/auth.json +++ b/public/auth.json @@ -28,7 +28,6 @@ "src/agents/index.ts": "https://kevisual.cn/root/ai/kevisual/frontend/vite-react-template/src/agents/index.ts", "src/modules/basename.ts": "https://kevisual.cn/root/ai/kevisual/frontend/vite-react-template/src/modules/basename.ts", "src/modules/query.ts": "https://kevisual.cn/root/ai/kevisual/frontend/vite-react-template/src/modules/query.ts", - "src/modules/convex.ts": "https://kevisual.cn/root/ai/kevisual/frontend/vite-react-template/src/modules/convex.ts", "src/routes/demo.tsx": "https://kevisual.cn/root/ai/kevisual/frontend/vite-react-template/src/routes/demo.tsx", "src/routes/index.tsx": "https://kevisual.cn/root/ai/kevisual/frontend/vite-react-template/src/routes/index.tsx", "src/routes/login.tsx": "https://kevisual.cn/root/ai/kevisual/frontend/vite-react-template/src/routes/login.tsx", diff --git a/src/modules/convex.ts b/src/modules/convex.ts deleted file mode 100644 index bfebdb5..0000000 --- a/src/modules/convex.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { api } from "@kevisual/convex"; -import { ConvexClient, AuthTokenFetcher, ConvexHttpClient } from "convex/browser"; -const url = localStorage.getItem("CONVEX_URL") || 'https://convex.kevisual.cn' -const client = new ConvexClient(url!); -const httpClient = new ConvexHttpClient(url!); -if (url !== 'https://convex.kevisual.cn') { - console.warn("当前使用的Convex URL为:", url, "请确保这是你想要连接的Convex实例"); -} -export const initConvex = async () => { - const getToken = async () => { - const token = localStorage.getItem("token"); - if (!token) { - return null; - } - const res = await httpClient.action(api.token.create, { token: token! }); - if (res.code === 200) { - return res.data.accessToken; - } - return null; - } - const authTokenFetcher: AuthTokenFetcher = async ({ forceRefreshToken }: { forceRefreshToken: boolean }) => { - // 无论是否强制刷新,都优先使用缓存(除非缓存无效) - if (!forceRefreshToken) { - const cachedToken = sessionStorage.getItem("convex_token"); - if (cachedToken) { - return cachedToken; - } - } - - // 没有缓存或强制刷新时,获取新 token - const token = await getToken(); - if (token) { - sessionStorage.setItem("convex_token", token); - } - return token; - - } - client.setAuth(authTokenFetcher, (isAuthenticated) => { - console.log("Auth isAuthenticated:", isAuthenticated); - }); -} - -export { client, httpClient }; \ No newline at end of file diff --git a/src/pages/auth/index.tsx b/src/pages/auth/index.tsx index 609e1fd..abc6ff5 100644 --- a/src/pages/auth/index.tsx +++ b/src/pages/auth/index.tsx @@ -5,7 +5,6 @@ import { LogIn, LockKeyhole } from "lucide-react" export { BaseHeader } from './modules/BaseHeader' import { useMemo } from 'react'; import { useLocation, useNavigate } from '@tanstack/react-router'; -import { initConvex } from "@/modules/convex"; type Props = { children?: React.ReactNode, @@ -19,7 +18,6 @@ export const AuthProvider = ({ children, mustLogin }: Props) => { }))); useEffect(() => { store.init() - initConvex(); }, []) const location = useLocation() const navigate = useNavigate();