feat: 更新版本至 0.0.52,升级依赖 @kevisual/query 至 0.0.47 和 @kevisual/router 至 0.0.75,移除不必要的 setBaseResponse 调用
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/api",
|
||||
"version": "0.0.51",
|
||||
"version": "0.0.52",
|
||||
"description": "",
|
||||
"main": "mod.ts",
|
||||
"scripts": {
|
||||
@@ -18,14 +18,14 @@
|
||||
"keywords": [],
|
||||
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
||||
"license": "MIT",
|
||||
"packageManager": "pnpm@10.29.3",
|
||||
"packageManager": "pnpm@10.30.0",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@kevisual/cache": "^0.0.5",
|
||||
"@kevisual/code-builder": "^0.0.6",
|
||||
"@kevisual/query": "^0.0.40",
|
||||
"@kevisual/query": "^0.0.47",
|
||||
"@kevisual/remote-app": "^0.0.4",
|
||||
"@kevisual/router": "^0.0.70",
|
||||
"@kevisual/router": "^0.0.75",
|
||||
"@kevisual/types": "^0.0.12",
|
||||
"@kevisual/use-config": "^1.0.30",
|
||||
"@types/bun": "^1.3.9",
|
||||
|
||||
27
pnpm-lock.yaml
generated
27
pnpm-lock.yaml
generated
@@ -52,14 +52,14 @@ importers:
|
||||
specifier: ^0.0.6
|
||||
version: 0.0.6
|
||||
'@kevisual/query':
|
||||
specifier: ^0.0.40
|
||||
version: 0.0.40
|
||||
specifier: ^0.0.47
|
||||
version: 0.0.47
|
||||
'@kevisual/remote-app':
|
||||
specifier: ^0.0.4
|
||||
version: 0.0.4
|
||||
'@kevisual/router':
|
||||
specifier: ^0.0.70
|
||||
version: 0.0.70
|
||||
specifier: ^0.0.75
|
||||
version: 0.0.75
|
||||
'@kevisual/types':
|
||||
specifier: ^0.0.12
|
||||
version: 0.0.12
|
||||
@@ -126,8 +126,8 @@ packages:
|
||||
'@kevisual/query@0.0.18':
|
||||
resolution: {integrity: sha512-I2vHTu0I6AyD9PJyr+vxyp9jIJ6rd2EZqLVHTv/+zrVKVc2SS76Tg7aGNkmAFqqLSCB8kLLsmMGtSJU1Qb8VVg==}
|
||||
|
||||
'@kevisual/query@0.0.40':
|
||||
resolution: {integrity: sha512-7m5BgDzd01m51hCHUId6ugQHdwgrLTb6fI7DSuMY17VjWb0+zGnkYmvRBqkTXzoIjjYbP5iwtRnrooEoToQfhg==}
|
||||
'@kevisual/query@0.0.47':
|
||||
resolution: {integrity: sha512-ZR7WXeDDGUSzBtcGVU3J173sA0hCqrGTw5ybGbdNGlM0VyJV/XQIovCcSoZh1YpnciLRRqJvzXUgTnCkam+M3g==}
|
||||
|
||||
'@kevisual/remote-app@0.0.4':
|
||||
resolution: {integrity: sha512-2yIlWY98pLCcxG+DJsqXXkd5YYEgymuOsyElH+31AoEPb7mlNREnYS81zN0KM9nvdSmU2G51vV4UVirJlYBZCQ==}
|
||||
@@ -135,8 +135,8 @@ packages:
|
||||
'@kevisual/router@0.0.20':
|
||||
resolution: {integrity: sha512-uSwDYWh+kvAu6i0m0SJVgcLR/CYz7WvIWGz0nSF8Vg6smJuAgI+laHR4ESO8Fbz+Xn8bPHuSwmM//HHLMLx2FA==}
|
||||
|
||||
'@kevisual/router@0.0.70':
|
||||
resolution: {integrity: sha512-vXlIj9jRufhcIfeuPWemjSI+dxdzSmIBq5eRxQzqEfAJ7k+mBPhoI4KxH8vHnwyL30bqm8EdODL/p6Wg8uBw3g==}
|
||||
'@kevisual/router@0.0.75':
|
||||
resolution: {integrity: sha512-WBDRKMjNYTP7ymkUUtiQwWYIcqnc+TGo3rFuRze8ovYV2UN5cQxIkIfsDbgWOdV1/v9b57gtiJvJRqWjCBWKRg==}
|
||||
|
||||
'@kevisual/types@0.0.10':
|
||||
resolution: {integrity: sha512-Q73uzzjk9UidumnmCvOpgzqDDvQxsblz22bIFuoiioUFJWwaparx8bpd8ArRyFojicYL1YJoFDzDZ9j9NN8grA==}
|
||||
@@ -454,9 +454,6 @@ packages:
|
||||
tr46@0.0.3:
|
||||
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
|
||||
|
||||
tslib@2.8.1:
|
||||
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
||||
|
||||
undici-types@5.26.5:
|
||||
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
||||
|
||||
@@ -520,9 +517,7 @@ snapshots:
|
||||
- ws
|
||||
- zod
|
||||
|
||||
'@kevisual/query@0.0.40':
|
||||
dependencies:
|
||||
tslib: 2.8.1
|
||||
'@kevisual/query@0.0.47': {}
|
||||
|
||||
'@kevisual/remote-app@0.0.4': {}
|
||||
|
||||
@@ -531,7 +526,7 @@ snapshots:
|
||||
path-to-regexp: 8.2.0
|
||||
selfsigned: 2.4.1
|
||||
|
||||
'@kevisual/router@0.0.70':
|
||||
'@kevisual/router@0.0.75':
|
||||
dependencies:
|
||||
es-toolkit: 1.44.0
|
||||
|
||||
@@ -819,8 +814,6 @@ snapshots:
|
||||
|
||||
tr46@0.0.3: {}
|
||||
|
||||
tslib@2.8.1: {}
|
||||
|
||||
undici-types@5.26.5: {}
|
||||
|
||||
undici-types@6.21.0: {}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Query, BaseQuery } from '@kevisual/query';
|
||||
import type { Result, DataOpts } from '@kevisual/query/query';
|
||||
import { setBaseResponse } from '@kevisual/query/query';
|
||||
import { LoginCacheStore, CacheStore } from './login-cache.ts';
|
||||
import { Cache } from './login-cache.ts';
|
||||
import { BaseLoad } from '@kevisual/load';
|
||||
@@ -166,7 +165,6 @@ export class QueryLogin extends BaseQuery {
|
||||
{ key: 'refreshToken', data },
|
||||
{
|
||||
afterResponse: async (response, ctx) => {
|
||||
setBaseResponse(response);
|
||||
return response as any;
|
||||
},
|
||||
},
|
||||
@@ -200,7 +198,6 @@ export class QueryLogin extends BaseQuery {
|
||||
body: body,
|
||||
headers: { ...headers, Authorization: `Bearer ${accessToken}` },
|
||||
});
|
||||
setBaseResponse(res);
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -47,7 +47,7 @@ export const initApi = async (opts: {
|
||||
metadata: metadata,
|
||||
}).define(async (ctx) => {
|
||||
const msg = { ...ctx.query };
|
||||
if (msg.token === undefined && token !== undefined) {
|
||||
if (msg.token === undefined && token !== undefined && !_isBrowser) {
|
||||
msg.token = token;
|
||||
}
|
||||
const res = await query.post<any>({ path: r.path, key: r.key, ...msg });
|
||||
|
||||
Reference in New Issue
Block a user