fix: use @keivusal/auth module
This commit is contained in:
parent
dc69b95f39
commit
801e05b23e
@ -28,14 +28,14 @@
|
||||
],
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@abearxiong/auth": "1.0.2",
|
||||
"@kevisual/auth": "1.0.4",
|
||||
"@abearxiong/use-config": "^0.0.2",
|
||||
"@babel/core": "^7.26.0",
|
||||
"@babel/preset-env": "^7.26.0",
|
||||
"@babel/preset-typescript": "^7.26.0",
|
||||
"@kevisual/ai-graph": "workspace:^",
|
||||
"@kevisual/ai-lang": "workspace:^",
|
||||
"@kevisual/router": "0.0.5-alpha-1",
|
||||
"@kevisual/router": "0.0.5-alpha-2",
|
||||
"@supabase/supabase-js": "^2.46.1",
|
||||
"@types/semver": "^7.5.8",
|
||||
"archiver": "^7.0.1",
|
||||
|
34
pnpm-lock.yaml
generated
34
pnpm-lock.yaml
generated
@ -14,9 +14,6 @@ importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@abearxiong/auth':
|
||||
specifier: 1.0.2
|
||||
version: 1.0.2(@abearxiong/router@0.0.1-alpha.43)
|
||||
'@abearxiong/use-config':
|
||||
specifier: ^0.0.2
|
||||
version: 0.0.2
|
||||
@ -35,9 +32,12 @@ importers:
|
||||
'@kevisual/ai-lang':
|
||||
specifier: workspace:^
|
||||
version: link:packages/ai-lang
|
||||
'@kevisual/auth':
|
||||
specifier: 1.0.4
|
||||
version: 1.0.4(@kevisual/router@0.0.5-alpha-2)
|
||||
'@kevisual/router':
|
||||
specifier: 0.0.5-alpha-1
|
||||
version: 0.0.5-alpha-1
|
||||
specifier: 0.0.5-alpha-2
|
||||
version: 0.0.5-alpha-2
|
||||
'@supabase/supabase-js':
|
||||
specifier: ^2.46.1
|
||||
version: 2.46.1
|
||||
@ -320,11 +320,6 @@ importers:
|
||||
|
||||
packages:
|
||||
|
||||
'@abearxiong/auth@1.0.2':
|
||||
resolution: {integrity: sha512-Ag7JFRnQ8H0INkWVcFcFvuLbOupeaOBlYbr2Imf+64zQi26zuPFh6lPOtgucEN3DQFJfDVznwIxuPbvkuvEpGg==, tarball: https://npm.pkg.github.com/download/@abearxiong/auth/1.0.2/54654ed68b6e00dc6b88bf88d81b7818ffcbc18e}
|
||||
peerDependencies:
|
||||
'@abearxiong/router': ^0.0.1-alpha.38
|
||||
|
||||
'@abearxiong/router@0.0.1-alpha.36':
|
||||
resolution: {integrity: sha512-rpxel/upIeJEsRYHXqAOezAooPvXFjuWeA28oB/KClrP8B9WY8grlmHQUkvtsGtXypOCqcYoxZ9Nb9awJlzN5A==, tarball: https://npm.pkg.github.com/download/@abearxiong/router/0.0.1-alpha.36/c4e3c3f88da8e6b1217450ab3713c600efcb5504}
|
||||
|
||||
@ -1053,8 +1048,13 @@ packages:
|
||||
'@jridgewell/trace-mapping@0.3.25':
|
||||
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
|
||||
|
||||
'@kevisual/router@0.0.5-alpha-1':
|
||||
resolution: {integrity: sha512-2dRt8gT6rg++jNHgxwdG/S5BimwuK/Tdj6t7Ndfm6nRESaZm1ZAdyjlakOPWiGTP+8by/MYE5IeBgK1Y1vsRhA==}
|
||||
'@kevisual/auth@1.0.4':
|
||||
resolution: {integrity: sha512-PcSVQdawOqMOTm1ZKumkC8n3SJSaNOcCYAma0XeutwJEpUMUcHWl5eB2Tado3RwOJx1F1TF5jlbgFcRJZwerog==}
|
||||
peerDependencies:
|
||||
'@kevisual/router': ^0.0.4
|
||||
|
||||
'@kevisual/router@0.0.5-alpha-2':
|
||||
resolution: {integrity: sha512-9cCa7CEji4q2ByMxxaxzqia42EzbBGdNGKqvs25c2qedAvnXbYaRpaiOdNSNiIXg+eTPQ0ah5HDNRcY2XApD8Q==}
|
||||
|
||||
'@langchain/core@0.3.3':
|
||||
resolution: {integrity: sha512-WAtkmhbdl2T41qzimTzhb3pXCHQxO4onqxzPxgdf3KftQdTwLq0YYBDhozRMZLNAd/+cfH0ymZGaZSsnc9Ogsg==}
|
||||
@ -4029,10 +4029,6 @@ packages:
|
||||
|
||||
snapshots:
|
||||
|
||||
'@abearxiong/auth@1.0.2(@abearxiong/router@0.0.1-alpha.43)':
|
||||
dependencies:
|
||||
'@abearxiong/router': 0.0.1-alpha.43
|
||||
|
||||
'@abearxiong/router@0.0.1-alpha.36':
|
||||
dependencies:
|
||||
ws: 8.18.0
|
||||
@ -4880,7 +4876,11 @@ snapshots:
|
||||
'@jridgewell/resolve-uri': 3.1.2
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
|
||||
'@kevisual/router@0.0.5-alpha-1':
|
||||
'@kevisual/auth@1.0.4(@kevisual/router@0.0.5-alpha-2)':
|
||||
dependencies:
|
||||
'@kevisual/router': 0.0.5-alpha-2
|
||||
|
||||
'@kevisual/router@0.0.5-alpha-2':
|
||||
dependencies:
|
||||
path-to-regexp: 8.2.0
|
||||
selfsigned: 2.4.1
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { useConfig } from '@abearxiong/use-config';
|
||||
import { sequelize } from '@/modules/sequelize.ts';
|
||||
import { DataTypes, Model, Op } from 'sequelize';
|
||||
import { createToken, checkToken } from '@abearxiong/auth/token';
|
||||
import { cryptPwd } from '@abearxiong/auth';
|
||||
import { createToken, checkToken } from '@kevisual/auth/token';
|
||||
import { cryptPwd } from '@kevisual/auth';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { CustomError } from '@kevisual/router';
|
||||
import { Org } from './org.ts';
|
||||
|
@ -3,7 +3,7 @@
|
||||
import './routes/index.ts';
|
||||
import { app } from './app.ts';
|
||||
import { useConfig } from '@abearxiong/use-config';
|
||||
import { createAuthRoute } from '@abearxiong/auth';
|
||||
import { createAuthRoute } from '@kevisual/auth';
|
||||
const config = useConfig<{ tokenSecret: string }>();
|
||||
|
||||
createAuthRoute({
|
||||
|
@ -20,7 +20,7 @@ app
|
||||
...searchWhere,
|
||||
},
|
||||
limit: pageSize,
|
||||
offset: page * pageSize,
|
||||
offset: (page - 1) * pageSize,
|
||||
});
|
||||
ctx.body = {
|
||||
pagination: {
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { app } from '@/app.ts';
|
||||
import { Org } from '@/models/org.ts';
|
||||
import { User } from '@/models/user.ts';
|
||||
import { CustomError } from '@kevisual/router';
|
||||
|
||||
app
|
||||
.route({
|
||||
path: 'user',
|
||||
key: 'me',
|
||||
middleware: ['auth'],
|
||||
isDebug: true,
|
||||
})
|
||||
.define(async (ctx) => {
|
||||
const tokenUser = ctx.state?.tokenUser || {};
|
||||
|
@ -38,7 +38,6 @@
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"dist",
|
||||
"src/**/*.test.ts",
|
||||
"webpack.config.cjs",
|
||||
"src/**/*.test.ts"
|
||||
],
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user